def test_not_found_method(self): """ Rejects name not found in interface. """ name = "non_existent" self.assertNotIn(name, IFlockerAPIV1Client.names()) with self.assertRaises(InvalidMethod): validate_method_name(IFlockerAPIV1Client, name)
def test_method_with_parameters(self): """ Rejects method that requires parameters. """ name = "create_dataset" self.assertIn(name, IFlockerAPIV1Client.names()) with self.assertRaises(InvalidMethod): validate_method_name(IFlockerAPIV1Client, name)
def test_not_found_method(self): """ Rejects name not found in interface. """ name = 'non_existent' self.assertNotIn(name, IFlockerAPIV1Client.names()) self.assertRaises( InvalidMethod, validate_method_name, IFlockerAPIV1Client, name, )
def test_method_with_parameters(self): """ Rejects method that requires parameters. """ name = 'create_dataset' self.assertIn(name, IFlockerAPIV1Client.names()) self.assertRaises( InvalidMethod, validate_method_name, IFlockerAPIV1Client, name, )
def test_no_parameter_method(self): name = "version" self.assertIn(name, IFlockerAPIV1Client.names()) validate_method_name(IFlockerAPIV1Client, name)
def test_no_parameter_method(self): name = 'version' self.assertIn(name, IFlockerAPIV1Client.names()) validate_method_name(IFlockerAPIV1Client, name)