Source code for minos.common.testing.database.factories.managements

from ....database import (
    DatabaseOperation,
    ManagementDatabaseOperationFactory,
)
from ..clients import (
    MockedDatabaseClient,
)
from ..operations import (
    MockedDatabaseOperation,
)


[docs]class MockedManagementDatabaseOperationFactory(ManagementDatabaseOperationFactory): """For testing purposes"""
[docs] def build_create(self, database: str) -> DatabaseOperation: """For testing purposes""" return MockedDatabaseOperation("create")
[docs] def build_delete(self, database: str) -> DatabaseOperation: """For testing purposes""" return MockedDatabaseOperation("delete")
MockedDatabaseClient.set_factory(ManagementDatabaseOperationFactory, MockedManagementDatabaseOperationFactory)