'``StartApplication.run()`` only passes an ``Environment`` instance
if the application defines an environment.'

def test_environment_not_supplied(self):

    fake_docker = FakeDockerClient()
    deployer = ApplicationNodeDeployer(u'example.com', fake_docker)
    application_name = u'site-example.com'
    application = Application(name=application_name, image=DockerImage(repository=u'clusterhq/postgresql', tag=u'9.3.5'), environment=None, links=frozenset())
    StartApplication(application=application, node_state=EMPTY_NODESTATE).run(deployer, state_persister=InMemoryStatePersister())
    self.assertEqual(None, fake_docker._units[application_name].environment)
