def test_validates_when_location_is_present_in_parameters_and_parameters_contains_batch_key(self):
     self.assertTrue(is_valid({'location': '', 'batch': '1'}))
     self.assertTrue(is_valid({'location': '2', 'batch': '1', 'ea': '1'}))
     self.assertTrue(is_valid({'location': '2', 'batch': '1', 'ea': ''}))
Example #2
0
 def test_validates_when_location_is_present_in_parameters_and_parameters_contains_batch_key(self):
     self.assertTrue(is_valid({'location': '', 'batch': '1'}))
     self.assertTrue(is_valid({'location': '2', 'batch': '1', 'ea': '1'}))
     self.assertTrue(is_valid({'location': '2', 'batch': '1', 'ea': ''}))
 def test_should_validate_params(self):
     self.assertFalse(is_valid({'location': '2', 'batch': 'NOT_A_DIGIT'}))
     self.assertFalse(is_valid({'location': '2', 'batch': ''}))
     self.assertFalse(is_valid({'location': '2', 'batch': '2', 'ea': 'NOT_A_DIGIT'}))
Example #4
0
 def test_should_validate_params(self):
     self.assertFalse(is_valid({'location': '2', 'batch': 'NOT_A_DIGIT'}))
     self.assertFalse(is_valid({'location': '2', 'batch': ''}))
     self.assertFalse(is_valid({'location': '2', 'batch': '2', 'ea': 'NOT_A_DIGIT'}))