def test_get_action_class_returns_SSHKeysImportAction_class(self): # Test uses SSHKeysImportAction as its know to exist. handler = {"name": "SSHKeysHandler"} action = {"name": "import"} self.assertEqual( SSHKeysImportAction, api.get_action_class(handler, action) )
def test_get_action_class_returns_BootResourcesCreateAction_class(self): # Test uses BootResourcesCreateAction as its know to exist. handler = {"name": "BootResourcesHandler"} action = {"name": "create"} self.assertEqual( BootResourcesCreateAction, api.get_action_class(handler, action) )
def test_get_action_class_returns_None_for_unknown_handler(self): handler = {"name": factory.make_name("handler")} action = {"name": "create"} self.assertIsNone(api.get_action_class(handler, action))
def test_get_action_class_returns_None_for_unknown_handler(self): handler = {'name': factory.make_name('handler')} action = {'name': 'create'} self.assertIsNone(api.get_action_class(handler, action))