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