summaryrefslogtreecommitdiff
path: root/tests/unit/models_resources_test.py
blob: 25c6a3ed0c22f375b04daf6f7b5a3b08e81e0835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"