Skip to content

Commit

Permalink
Fix serial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternak committed Jan 6, 2020
1 parent fbc89be commit a38bd84
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Expand Up @@ -22,7 +22,8 @@ jobs:
- run: make assets

# Uruchamiaj na lokalnym firefoxie używając jednego CPU
- run: pytest -n 2 --cov=src --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost
- run: pytest -n 2 --cov=src --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost -m "not serial"
- run: pytest -n 0 --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost -m "serial"

# Testy JavaScript
- run: make js-tests
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -71,7 +71,8 @@ jenkins:
pipenv install -d
make assets

pytest --ds=django_bpp.settings.local -n6 --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost --create-db --maxfail=20
pytest -m "not serial" --ds=django_bpp.settings.local -n6 --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost --create-db --maxfail=20
pytest -m "serial" --ds=django_bpp.settings.local -n0 --splinter-webdriver=firefox --nginx-host=localhost --liveserver=localhost --create-db --maxfail=20

yarn
make js-tests
2 changes: 1 addition & 1 deletion Pipfile
Expand Up @@ -79,7 +79,7 @@ sphinx-autobuild = "==0.7.1"
pdbpp = "==0.9.1"
coveralls = "==1.10.0"
psutil = "==5.4.5"
pytest = "*"
pytest = "==5.3.2"
pytest-django = "*"
pytest-cov = "*"
pytest-localserver = "*"
Expand Down
4 changes: 3 additions & 1 deletion src/bpp/tests/tests_legacy/test_commands.py
@@ -1,3 +1,4 @@
import pytest
from model_mommy import mommy
from django.core.management import call_command

Expand All @@ -21,6 +22,7 @@ def test_afiliacja(self):
afiliacja(d1, kw)
self.assertEqual(kw['recenzowana'], False)

@pytest.mark.serial
def test_rebuild_cache(self):
mommy.make(Wydawnictwo_Ciagle)
call_command("rebuild_cache")
call_command("rebuild_cache")

0 comments on commit a38bd84

Please sign in to comment.