Exemple #1
0
 def test_BaseModel_bad_state(self):
     with testtools.ExpectedException(TypeError,
                                      "'blah' is not a valid state"):
         o = zk.BaseModel('0001')
         o.state = 'blah'
Exemple #2
0
 def test_BaseModel_toDict(self):
     o = zk.BaseModel('0001')
     d = o.toDict()
     self.assertNotIn('id', d)
Exemple #3
0
 def test_BaseModel_bad_id(self):
     with testtools.ExpectedException(
             TypeError, "'id' attribute must be a string type"):
         zk.BaseModel(123)