Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternak committed Jun 26, 2018
1 parent f414f5b commit 6e577e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bpp/tests_pytest/test_cache.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# TODO: przenies do bpp/tests/test_cache.py
import pytest
from django.db import transaction
from model_mommy import mommy

from bpp.models.autor import Autor
Expand Down Expand Up @@ -300,8 +301,9 @@ def test_caching_kolejnosc(transactional_db, wydawnictwo_ciagle_z_dwoma_autorami
k = a[0].kolejnosc
a[0].kolejnosc = a[1].kolejnosc
a[1].kolejnosc = k
a[0].save()
a[1].save()
with transaction.atomic():
a[0].save()
a[1].save()

x = Rekord.objects.get_original(wydawnictwo_ciagle_z_dwoma_autorami)
assert "[AUT.] NOWAK JAN, KOWALSKI JAN" in x.opis_bibliograficzny_cache
Expand Down

0 comments on commit 6e577e7

Please sign in to comment.