'A container that does not include any environment variables contains
an empty ``environment`` in the return ``Unit``.'

def test_null_environment(self):

    docker_dir = FilePath(self.mktemp())
    docker_dir.makedirs()
    docker_dir.child('Dockerfile').setContent('FROM    scratch\nMAINTAINER    info@clusterhq.com\nCMD    ["/bin/doesnotexist"]')
    name = random_name(self)
    image = DockerImageBuilder(test=self, source_dir=docker_dir)
    d = image.build()
    def image_built(image_name):
        client = self.make_client()
        self.create_container(client, name, image_name)
        self.addCleanup(client.remove, name)
        return client.list()
    d.addCallback(image_built)
    def got_list(units):
        unit = [unit for unit in units if (unit.name == name)][0]
        self.assertIsNone(unit.environment)
    d.addCallback(got_list)
    return d
