blob: a09da21b9347d2cf9972aec9e5b439403c86bee5 [file] [log] [blame]
Joshua Heskethc94afc42014-09-06 13:30:09 +10001# Copyright 2014 Rackspace Australia
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15import logging
16import testtools
17
18import zuul.trigger
19
20
21class TestGerritTrigger(testtools.TestCase):
22 log = logging.getLogger("zuul.test_trigger")
23
24 def test_trigger_abc(self):
25 # We only need to instantiate a class for this
26 trigger = zuul.trigger.gerrit.GerritTrigger(None, None, None, # noqa
27 None)
28
29 def test_trigger_name(self):
30 self.assertEqual('gerrit', zuul.trigger.gerrit.GerritTrigger.name)
31
32
33class TestTimerTrigger(testtools.TestCase):
34 log = logging.getLogger("zuul.test_trigger")
35
36 def test_trigger_abc(self):
37 # We only need to instantiate a class for this
38 trigger = zuul.trigger.timer.TimerTrigger(None, None) # noqa
39
40 def test_trigger_name(self):
41 self.assertEqual('timer', zuul.trigger.timer.TimerTrigger.name)
42
43
44class TestZuulTrigger(testtools.TestCase):
45 log = logging.getLogger("zuul.test_trigger")
46
47 def test_trigger_abc(self):
48 # We only need to instantiate a class for this
49 trigger = zuul.trigger.zuultrigger.ZuulTrigger(None, None) # noqa
50
51 def test_trigger_name(self):
52 self.assertEqual('zuul', zuul.trigger.zuultrigger.ZuulTrigger.name)