def test_environment_supplied_to_docker(self):
        fake_docker = FakeDockerClient()
        deployer = ApplicationNodeDeployer(u'example.com', fake_docker)

        application_name = u'site-example.com'
        variables = frozenset({u'foo': u"bar", u"baz": u"qux"}.iteritems())
        application = Application(
            name=application_name,
            image=DockerImage(repository=u'clusterhq/postgresql',
                              tag=u'9.3.5'),
            environment=variables.copy(),
            links=frozenset(),
            ports=(),
        )

        StartApplication(
            application=application,
            node_state=EMPTY_NODESTATE,
        ).run(deployer, state_persister=InMemoryStatePersister())

        expected_environment = Environment(variables=variables.copy())

        self.assertEqual(
            expected_environment,
            fake_docker._units[application_name].environment
        )
The same format field used twice in one event is rendered twice.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/StartApplicationTests.test_environment_supplied_to_docker--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/logger/test/test_flatten.py/FlatFormattingTests.test_formatFlatEventFieldNamesSame