Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testcontainers for integration tests #44

Open
korchizhinskiy opened this issue Dec 20, 2024 · 0 comments
Open

Add testcontainers for integration tests #44

korchizhinskiy opened this issue Dec 20, 2024 · 0 comments
Labels
tests Testing project functionality

Comments

@korchizhinskiy
Copy link
Owner

This code about connect new library - https://testcontainers.com/guides/getting-started-with-testcontainers-for-python/

postgres = PostgresContainer("postgres:16-alpine")


@pytest_asyncio.fixture(autouse=True, scope="session")
async def setup_database(request: SubRequest):
    postgres.start()

    def remove_container():
        postgres.stop()

    request.addfinalizer(remove_container)
@korchizhinskiy korchizhinskiy added the tests Testing project functionality label Dec 20, 2024
@korchizhinskiy korchizhinskiy moved this to Backlog in MVP Development Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Testing project functionality
Projects
Status: Backlog
Development

No branches or pull requests

1 participant