def test_memory_swap_limit(self):
    self.mock_client.create_host_config.return_value = {}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, mem_limit=1000000000, memswap_limit=2000000000)
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['mem_limit'] == 1000000000)
    assert (self.mock_client.create_host_config.call_args[1]['memswap_limit'] == 2000000000)
def test_memory_swap_limit(self):
    self.mock_client.create_host_config.return_value = {}
    service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, mem_limit=1000000000, memswap_limit=2000000000)
    service._get_container_create_options({'some': 'overrides'}, 1)
    assert self.mock_client.create_host_config.called
    assert (self.mock_client.create_host_config.call_args[1]['mem_limit'] == 1000000000)
    assert (self.mock_client.create_host_config.call_args[1]['memswap_limit'] == 2000000000)