Island: Rename _delete_collection -> _remove_credentials_fom_collection

This commit is contained in:
Mike Salvatore 2022-07-11 08:02:20 -04:00
parent 8a7e89e733
commit 088ec94269
1 changed files with 7 additions and 3 deletions

View File

@ -43,10 +43,14 @@ class MongoCredentialsRepository(ICredentialsRepository):
) )
def remove_configured_credentials(self): def remove_configured_credentials(self):
MongoCredentialsRepository._delete_collection(self._mongo.db.configured_credentials) MongoCredentialsRepository._remove_credentials_fom_collection(
self._mongo.db.configured_credentials
)
def remove_stolen_credentials(self): def remove_stolen_credentials(self):
MongoCredentialsRepository._delete_collection(self._mongo.db.stolen_credentials) MongoCredentialsRepository._remove_credentials_fom_collection(
self._mongo.db.stolen_credentials
)
def remove_all_credentials(self): def remove_all_credentials(self):
self.remove_configured_credentials() self.remove_configured_credentials()
@ -74,7 +78,7 @@ class MongoCredentialsRepository(ICredentialsRepository):
raise StorageError(err) raise StorageError(err)
@staticmethod @staticmethod
def _delete_collection(collection): def _remove_credentials_fom_collection(collection):
try: try:
collection.delete_many({}) collection.delete_many({})
except RemovalError as err: except RemovalError as err: