summaryrefslogtreecommitdiff
path: root/tests/integration/models_services_test.py
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2018-01-29 19:10:12 -0800
committerJoffrey F <joffrey@docker.com>2018-01-30 14:26:24 -0800
commit342221130918f4525f01e31d3697cfc077df090e (patch)
treeecec590176339d863a51d78837c231bb4fa735fd /tests/integration/models_services_test.py
parent4ff296247b4ed9c4afbb0b5293bd4deecb4fe708 (diff)
downloaddocker-py-pytest-asserts.tar.gz
Use pytest assertspytest-asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/integration/models_services_test.py')
-rw-r--r--tests/integration/models_services_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/models_services_test.py b/tests/integration/models_services_test.py
index 827242a..39cccf8 100644
--- a/tests/integration/models_services_test.py
+++ b/tests/integration/models_services_test.py
@@ -6,6 +6,7 @@ from .. import helpers
from .base import TEST_API_VERSION
from docker.errors import InvalidArgument
from docker.types.services import ServiceMode
+import pytest
class ServiceTest(unittest.TestCase):
@@ -265,8 +266,7 @@ class ServiceTest(unittest.TestCase):
while len(tasks) == 0:
tasks = service.tasks()
assert len(tasks) == 1
- with self.assertRaises(InvalidArgument,
- msg='Cannot scale a global container'):
+ with pytest.raises(InvalidArgument):
service.scale(2)
assert len(tasks) == 1