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