Added pytest for testing, Added pytest and loguru packages to nix shell
This commit is contained in:
parent
23d2999baa
commit
8e70ce3c26
26
shell.nix
26
shell.nix
@ -3,17 +3,23 @@
|
|||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
inlyne # markdown viewer
|
inlyne # markdown viewer
|
||||||
|
|
||||||
# Python development environment
|
# Python development environment
|
||||||
(python3.withPackages(ps: with ps; [
|
(python3.withPackages(ps: with ps; [
|
||||||
# For SDK configuration
|
# For SDK configuration
|
||||||
python-dotenv
|
python-dotenv
|
||||||
|
|
||||||
# HTTP client
|
# Logging
|
||||||
requests
|
loguru
|
||||||
]))
|
|
||||||
];
|
# HTTP client
|
||||||
|
requests
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
pytest
|
||||||
|
]))
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14
tests/conftest.py
Normal file
14
tests/conftest.py
Normal 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
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user