コード例 #1
0
def before_app_feature(context):
    from balance_service.app import config
    balance_repository = MockBalanceRepository()
    application = app.create(config=config.test_config,
                             repository=balance_repository)
    context.web_client = application.test_client()
    context.balance_repository = balance_repository
コード例 #2
0
from balance_service.app import app
from balance_service.app.config import config
from balance_service.app.infrastructure.firestore_balance_repository import \
    FirestoreBalanceRepository

if __name__ == "__main__":
    app.create(config=config,
               balance_repository=FirestoreBalanceRepository(
                   config.BALANCE_NAMESPACE)).run(host='0.0.0.0',
                                                  port=config.PORT)
コード例 #3
0
def app(balance_repository):
    app = create(config.config, repository=balance_repository)
    return app
コード例 #4
0
from balance_service.app import app
from balance_service.app.config import config
from balance_service.app.infrastructure.balance_repository import \
    BalanceRepository

if __name__ == "__main__":
    balance_repository = BalanceRepository()
    app.create(config=config,
               repository=balance_repository).run(host='0.0.0.0',
                                                  port=int(config.PORT))