Пример #1
0
 def test_bad_attrs_and_missing_required(self):
     attrs = ["unknown_param", "test_param"]
     bad, missing = lib_ra._validate_instance_attributes(self.params, attrs)
     self.assertEqual(["unknown_param"], bad)
     self.assertEqual(
         sorted(["another parameter", "required_param"]),
         sorted(missing)
     )
Пример #2
0
 def test_bad_attrs(self):
     attrs = ["another parameter", "required_param", "unknown_param"]
     self.assertEqual(
         lib_ra._validate_instance_attributes(self.params, attrs),
         (["unknown_param"], [])
     )
Пример #3
0
 def test_optional(self):
     attrs = ["another parameter", "required_param", "test_param"]
     self.assertEqual(
         lib_ra._validate_instance_attributes(self.params, attrs),
         ([], [])
     )