Beispiel #1
0
 def test_yeast_model_raises(self):
     with self.assertRaises(YeastException) as ctx:
         YeastModel(u"not an allowed method")
     self.assertEquals(
         str(ctx.exception),
         u"Method 'not an allowed method' not allowed for yeast model",
     )  # noqa
Beispiel #2
0
class TestYeastModel(unittest.TestCase):

    def setUp(self):
        self.yeast_model = YeastModel(u'stir plate')

    def test_yeast_model_raises(self):
        with self.assertRaises(Exception):
            YeastModel(u'not an allowed method')

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
class TestYeastModel(unittest.TestCase):

    def setUp(self):
        self.yeast_model = YeastModel(u'stir plate')

    def test_yeast_model_raises(self):
        with self.assertRaises(YeastException) as ctx:
            YeastModel(u'not an allowed method')
        self.assertEquals(str(ctx.exception),
                          u"Method 'not an allowed method' not allowed for yeast model")  # noqa

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
Beispiel #4
0
class TestYeastModel(unittest.TestCase):
    def setUp(self):
        self.yeast_model = YeastModel(u"stir plate")

    def test_yeast_model_raises(self):
        with self.assertRaises(YeastException) as ctx:
            YeastModel(u"not an allowed method")
        self.assertEquals(
            str(ctx.exception),
            u"Method 'not an allowed method' not allowed for yeast model",
        )  # noqa

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
Beispiel #5
0
 def setUp(self):
     self.yeast_model = YeastModel(u'stir plate')
Beispiel #6
0
 def setUp(self):
     self.yeast_model = YeastModel(u"stir plate")