diff options
Diffstat (limited to 'tests/unit/models_resources_test.py')
-rw-r--r-- | tests/unit/models_resources_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/models_resources_test.py b/tests/unit/models_resources_test.py new file mode 100644 index 0000000..25c6a3e --- /dev/null +++ b/tests/unit/models_resources_test.py @@ -0,0 +1,14 @@ +import unittest + +from .fake_api import FAKE_CONTAINER_ID +from .fake_api_client import make_fake_client + + +class ModelTest(unittest.TestCase): + def test_reload(self): + client = make_fake_client() + container = client.containers.get(FAKE_CONTAINER_ID) + container.attrs['Name'] = "oldname" + container.reload() + assert client.api.inspect_container.call_count == 2 + assert container.attrs['Name'] == "foobar" |