Merge "Replace deprecated assertRaisesRegexp"
This commit is contained in:
commit
5e46c52c5c
|
@ -54,22 +54,22 @@ class TestAllocation(base.BaseTestCase):
|
||||||
|
|
||||||
def test_fail_if_incorrect_format(self):
|
def test_fail_if_incorrect_format(self):
|
||||||
allocations = ['incorrect_format']
|
allocations = ['incorrect_format']
|
||||||
self.assertRaisesRegexp(
|
self.assertRaisesRegex(
|
||||||
ValueError,
|
ValueError,
|
||||||
'Incorrect allocation',
|
'Incorrect allocation',
|
||||||
allocation.parse_allocations, allocations)
|
allocation.parse_allocations, allocations)
|
||||||
allocations = ['=,']
|
allocations = ['=,']
|
||||||
self.assertRaisesRegexp(
|
self.assertRaisesRegex(
|
||||||
ValueError,
|
ValueError,
|
||||||
'2 is required',
|
'2 is required',
|
||||||
allocation.parse_allocations, allocations)
|
allocation.parse_allocations, allocations)
|
||||||
allocations = ['abc=155']
|
allocations = ['abc=155']
|
||||||
self.assertRaisesRegexp(
|
self.assertRaisesRegex(
|
||||||
ValueError,
|
ValueError,
|
||||||
'Incorrect allocation',
|
'Incorrect allocation',
|
||||||
allocation.parse_allocations, allocations)
|
allocation.parse_allocations, allocations)
|
||||||
allocations = ['abc=155,xyz=999']
|
allocations = ['abc=155,xyz=999']
|
||||||
self.assertRaisesRegexp(
|
self.assertRaisesRegex(
|
||||||
ValueError,
|
ValueError,
|
||||||
'parameter is required',
|
'parameter is required',
|
||||||
allocation.parse_allocations, allocations)
|
allocation.parse_allocations, allocations)
|
||||||
|
|
Loading…
Reference in New Issue