Пример #1
0
 def test_registry_register_bad_thing(self):
     from io_scene_xray import registry
     try:
         registry.register_thing(self)
         self.fail('Should fail with an exception')
     except Exception as ex:
         self.assertIn('Unsupported thing', str(ex))
Пример #2
0
 def test_registry_unregister_nonown_thing(self):
     from io_scene_xray import registry
     try:
         thing = _Thing()
         registry.register_thing(thing, user='******')
         registry.unregister_thing(thing)
         self.fail('Should fail with an exception')
     except Exception as ex:
         self.assertIn('is not registered', str(ex))