'``StartApplication.run()`` passes an ``Application``\'s cpu_shares to
``DockerClient.add`` which is used when creating a Unit.'

def test_cpu_shares(self):

    EXPECTED_CPU_SHARES = 512
    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(), cpu_shares=EXPECTED_CPU_SHARES)
    StartApplication(application=application, node_state=EMPTY_NODESTATE).run(deployer, state_persister=InMemoryStatePersister())
    self.assertEqual(EXPECTED_CPU_SHARES, fake_docker._units[application_name].cpu_shares)
