Exemplo n.º 1
0
 def test_not_registed_object_raises_exception(self):
     with testtools.ExpectedException(base.NeutronDbObjectNotFoundByModel):
         base.get_object_class_by_model(self.not_registered_object.db_model)
Exemplo n.º 2
0
 def test_not_registed_object_raises_exception(self):
     with testtools.ExpectedException(base.NeutronDbObjectNotFoundByModel):
         base.get_object_class_by_model(self.not_registered_object.db_model)
Exemplo n.º 3
0
 def test_object_found_by_model(self):
     found_obj = base.get_object_class_by_model(
         self.registered_object.db_model)
     self.assertIs(self.registered_object, found_obj)
Exemplo n.º 4
0
 def test_object_found_by_model(self):
     found_obj = base.get_object_class_by_model(
         self.registered_object.db_model)
     self.assertIs(self.registered_object, found_obj)