ソースを参照

use TestCase.assertRaises instead of pytest.raises

master
Michael van Tellingen 10年前
コミット
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
 

読み込み中…
キャンセル
保存