def test_get_provenance(self): """Test for get_provenance.""" provenance_collection = {} host_name_value = 'host_name' set_provenance( provenance_collection, provenance_host_name, host_name_value) user_value = 'user' set_provenance( provenance_collection, provenance_user, user_value) self.assertEqual(host_name_value, get_provenance( provenance_collection, provenance_host_name)) self.assertEqual(user_value, get_provenance( provenance_collection, provenance_user)) self.assertIsNone( get_provenance(provenance_collection, provenance_crs))
def test_get_provenance(self): """Test for get_provenance.""" provenance_collection = {} host_name_value = 'host_name' set_provenance(provenance_collection, provenance_host_name, host_name_value) user_value = 'user' set_provenance(provenance_collection, provenance_user, user_value) self.assertEqual( host_name_value, get_provenance(provenance_collection, provenance_host_name)) self.assertEqual( user_value, get_provenance(provenance_collection, provenance_user)) self.assertIsNone(get_provenance(provenance_collection, provenance_crs))
def test_set_provenance(self): """Test for set_provenance.""" provenance_collection = {} host_name_value = 'host_name' set_provenance(provenance_collection, provenance_host_name, host_name_value) expected = {provenance_host_name['provenance_key']: host_name_value} self.assertDictEqual(provenance_collection, expected) host_name_value = 'new_host_name' set_provenance(provenance_collection, provenance_host_name, host_name_value) expected = {provenance_host_name['provenance_key']: host_name_value} self.assertDictEqual(provenance_collection, expected) user_value = 'user' set_provenance(provenance_collection, provenance_user, user_value) expected = { provenance_host_name['provenance_key']: host_name_value, provenance_user['provenance_key']: user_value, } self.assertDictEqual(provenance_collection, expected)
def test_set_provenance(self): """Test for set_provenance.""" provenance_collection = {} host_name_value = 'host_name' set_provenance( provenance_collection, provenance_host_name, host_name_value) expected = {provenance_host_name['provenance_key']: host_name_value} self.assertDictEqual(provenance_collection, expected) host_name_value = 'new_host_name' set_provenance( provenance_collection, provenance_host_name, host_name_value) expected = {provenance_host_name['provenance_key']: host_name_value} self.assertDictEqual(provenance_collection, expected) user_value = 'user' set_provenance( provenance_collection, provenance_user, user_value) expected = { provenance_host_name['provenance_key']: host_name_value, provenance_user['provenance_key']: user_value, } self.assertDictEqual(provenance_collection, expected)