Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Liczenie punktw dla tlumaczen (#931)
- Loading branch information
1 parent
cab5411
commit f23825b
Showing
4 changed files
with
50 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/bpp/tests/test_models/test_sloty/test_sloty_tlumaczenie.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pytest | ||
|
||
from bpp.models.sloty.core import ISlot | ||
from bpp.models.sloty.wydawnictwo_zwarte import ( | ||
SlotKalkulator_Wydawnictwo_Zwarte_Prog3, | ||
SlotKalkulator_Wydawnictwo_Zwarte_Prog2, | ||
SlotKalkulator_Wydawnictwo_Zwarte_Prog1, | ||
) | ||
|
||
|
||
@pytest.mark.django_db | ||
def test_ISlot_tlumaczenie_tier3(zwarte_z_dyscyplinami): | ||
i = ISlot(zwarte_z_dyscyplinami) | ||
zwarte_z_dyscyplinami.punkty_kbn = 2.5 | ||
assert isinstance(i, SlotKalkulator_Wydawnictwo_Zwarte_Prog3) | ||
|
||
|
||
@pytest.mark.django_db | ||
def test_ISlot_tlumaczenie_tier2(zwarte_z_dyscyplinami, wydawca, rok): | ||
wydawca.poziom_wydawcy_set.create(rok=rok, poziom=1) | ||
zwarte_z_dyscyplinami.punkty_kbn = 40 | ||
i = ISlot(zwarte_z_dyscyplinami) | ||
assert isinstance(i, SlotKalkulator_Wydawnictwo_Zwarte_Prog2) | ||
|
||
|
||
@pytest.mark.django_db | ||
def test_ISlot_tlumaczenie_tier1(zwarte_z_dyscyplinami, wydawca, rok): | ||
wydawca.poziom_wydawcy_set.create(rok=rok, poziom=2) | ||
zwarte_z_dyscyplinami.punkty_kbn = 100 | ||
i = ISlot(zwarte_z_dyscyplinami) | ||
assert isinstance(i, SlotKalkulator_Wydawnictwo_Zwarte_Prog1) |