'``DockerClient.add`` accepts an integer mem_limit parameter which is
passed to Docker when creating a container as the maximum amount of RAM
available to that container.'

def test_add_with_memory_limit(self):

    MEMORY_100MB = 100000000
    name = random_name(self)
    d = self.start_container(name, mem_limit=MEMORY_100MB)
    def started(_):
        docker = dockerpy_client()
        data = docker.inspect_container((self.namespacing_prefix + name))
        self.assertEqual(data[u'Config'][u'Memory'], MEMORY_100MB)
    d.addCallback(started)
    return d
