Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def test_no_parameter_method(self):
     name = "version"
     self.assertIn(name, IFlockerAPIV1Client.names())
     validate_method_name(IFlockerAPIV1Client, name)
Exemplo n.º 4
0
 def test_no_parameter_method(self):
     name = 'version'
     self.assertIn(name, IFlockerAPIV1Client.names())
     validate_method_name(IFlockerAPIV1Client, name)