Commit 967abc7b by Karsa Zoltán István

assertItemsEqual deprecated

parent 2d0edccd
......@@ -195,9 +195,9 @@ class AclUserTest(TestCase):
i1.set_level(self.u1, 'alfa')
i2.set_level(self.u1, 'bravo')
i2.set_level(self.u2, 'bravo')
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.u1), [i1, i2])
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.u2), [i2])
def test_get_objects_with_level_for_superuser(self):
......@@ -206,11 +206,11 @@ class AclUserTest(TestCase):
i1.set_level(self.u1, 'alfa')
i2.set_level(self.us, 'alfa')
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.u1), [i1])
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.us), [i1, i2])
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.us,
disregard_superuser=True), [i2])
......@@ -220,7 +220,7 @@ class AclUserTest(TestCase):
i1.set_level(self.g1, 'alfa')
i2.set_level(self.g1, 'bravo')
i2.set_level(self.u1, 'bravo')
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_level('alfa', self.u1), [i1, i2])
def test_get_objects_with_group_level(self):
......@@ -229,9 +229,9 @@ class AclUserTest(TestCase):
i1.set_level(self.g1, 'alfa')
i2.set_level(self.g1, 'bravo')
i2.set_level(self.g2, 'bravo')
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_group_level('alfa', self.g1), [i1, i2])
self.assertItemsEqual(
self.assertCountEqual(
TestModel.get_objects_with_group_level('alfa', self.g2), [i2])
def test_owner(self):
......
......@@ -286,19 +286,19 @@ def val_ipv6_template(value):
>>> val_ipv6_template("::%(a)x:%(c)d:%(d)d")
Traceback (most recent call last):
...
ValidationError: [u"template doesn't use parameter b"]
django.core.exceptions.ValidationError: ["template doesn't use parameter b"]
Detects valid templates building invalid ips:
>>> val_ipv6_template("xxx::%(a)d:%(b)d:%(c)d:%(d)d")
Traceback (most recent call last):
...
ValidationError: [u'template renders invalid IPv6 address']
django.core.exceptions.ValidationError: ['template renders invalid IPv6 address']
Also IPv4-compatible addresses are invalid:
>>> val_ipv6_template("::%(a)02x%(b)02x:%(c)d:%(d)d")
Traceback (most recent call last):
...
ValidationError: [u'template results in IPv4 address']
django.core.exceptions.ValidationError: ['template results in IPv4 address']
"""
tpl = {ascii_letters[i]: 255 for i in range(4)}
try:
......
......@@ -53,3 +53,4 @@ enum34==1.1.10
ipaddress==1.0.23
django-nose==1.4.7
nose-exclude==0.5.0
factory_boy==3.2.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment