def test_initializer_auth_id_and_provider_resource_name(self): """Test Initializer with auth_id and provider resource name.""" auth_id = self.ocp_db_auth_id provider_resource_name = self.ocp_provider_resource_name accessor = ProviderAuthDBAccessor(auth_id=auth_id, provider_resource_name=provider_resource_name) self.assertTrue(accessor.does_db_entry_exist()) self.assertEqual(int(auth_id), accessor.get_auth_id())
def test_initializer_auth_id_and_credentials(self): """Test Initializer with auth_id and credentials.""" auth_id = self.ocp_db_auth.id credentials = self.ocp_provider.authentication.credentials accessor = ProviderAuthDBAccessor(auth_id=auth_id, credentials=credentials) self.assertTrue(accessor.does_db_entry_exist()) self.assertEqual(int(auth_id), accessor.get_auth_id())
def test_initializer(self): """Test Initializer""" auth_id = self.aws_db_auth_id accessor = ProviderAuthDBAccessor(auth_id) self.assertIsNotNone(accessor._session) self.assertTrue(accessor.does_db_entry_exist()) self.assertEqual(int(auth_id), accessor.get_auth_id()) accessor.close_session()
def test_initializer(self): """Test Initializer.""" auth_id = self.aws_db_auth.id accessor = ProviderAuthDBAccessor(auth_id) self.assertTrue(accessor.does_db_entry_exist()) self.assertEqual(int(auth_id), accessor.get_auth_id())