Просмотр исходного кода

use TestCase.assertRaises instead of pytest.raises

master
Michael van Tellingen 10 лет назад
Родитель
Сommit
6439a956c2
1 измененных файлов: 1 добавлений и 2 удалений
  1. 1
    2
      tests/unit/address/model_tests.py

+ 1
- 2
tests/unit/address/model_tests.py Просмотреть файл

@@ -1,5 +1,4 @@
1 1
 # -*- coding: utf-8 -*-
2
-import pytest
3 2
 from django.test import TestCase
4 3
 from django.core import exceptions
5 4
 
@@ -200,7 +199,7 @@ def assert_invalid_postcode(country_value, postcode_value):
200 199
     country = models.Country(iso_3166_1_a2=country_value)
201 200
     address = models.UserAddress(country=country, postcode=postcode_value)
202 201
 
203
-    with pytest.raises(exceptions.ValidationError):
202
+    with self.assertRaises(exceptions.ValidationError):
204 203
         address.clean()
205 204
 
206 205
 

Загрузка…
Отмена
Сохранить