Exemplo n.º 1
0
    def setUp(self):
        """ Stuff to be run before every test """
        Environment.config = "sample_test.conf"
        Environment.noargs = True
        self.env = Environment.getInstance()

        self.plugin = SampleModule()
Exemplo n.º 2
0
class TestSampleModule(unittest.TestCase):

    env = None

    def setUp(self):
        """ Stuff to be run before every test """
        Environment.config = "sample_test.conf"
        Environment.noargs = True
        self.env = Environment.getInstance()

        self.plugin = SampleModule()

    def tearDown(self):
        """ Stuff to be run after every test """
        pass

    def test_hello(self):
        self.assertEquals(self.plugin.hello("developer"), "Hello developer!")
        self.assertEquals(self.plugin.hello(), "Hello unknown!")

    def test_hello2(self):
        self.assertEquals(self.plugin.hello2(), '"Hello world!"')