Added pytest for testing, Added pytest and loguru packages to nix shell

This commit is contained in:
Andrew Bryant 2024-09-30 13:01:41 -04:00
parent 23d2999baa
commit 8e70ce3c26
2 changed files with 30 additions and 10 deletions

View File

@ -11,8 +11,14 @@ pkgs.mkShell {
# For SDK configuration # For SDK configuration
python-dotenv python-dotenv
# Logging
loguru
# HTTP client # HTTP client
requests requests
# Testing
pytest
])) ]))
]; ];
} }

14
tests/conftest.py Normal file
View File

@ -0,0 +1,14 @@
# Library imports
import pytest
####
# Global fixtures
####
# App client for testing
@pytest.fixture(scope='module')
def client():
app = create_app(config_class='tests/testing_config.py')
with app.app_context():
yield app