Esempio n. 1
0
 def test_provided(self):
     # RequiredKey is provided, should not be replaced
     params = {'RequiredKey': 'already populated'}
     generate_idempotent_uuid(params, self.mock_model)
     self.assertEqual(params['RequiredKey'], 'already populated')
Esempio n. 2
0
 def test_provided(self):
     # RequiredKey is provided, should not be replaced
     params = {'RequiredKey': 'already populated'}
     generate_idempotent_uuid(params, self.mock_model)
     self.assertEquals(params['RequiredKey'], 'already populated')
Esempio n. 3
0
 def test_injection(self):
     # No parameters are provided, RequiredKey should be autofilled
     params = {}
     generate_idempotent_uuid(params, self.mock_model)
     self.assertIn('RequiredKey', params)
     self.assertIsNotNone(self.uuid_pattern.match(params['RequiredKey']))
Esempio n. 4
0
 def test_injection(self):
     # No parameters are provided, RequiredKey should be autofilled
     params = {}
     generate_idempotent_uuid(params, self.mock_model)
     self.assertIn('RequiredKey', params)
     self.assertIsNotNone(self.uuid_pattern.match(params['RequiredKey']))