예제 #1
0
    def test_sets_plan_on_deploy(self):
        config = Mock()
        config.get_deploy_log = Mock()

        deployer = Mock()
        env = Environment(config, "staging", deployer)

        env.deploy("EXAMPLE-PLAN", "EXAMPLE-PLAN-39")

        self.assertEquals("EXAMPLE-PLAN", env.get_plan())
예제 #2
0
    def test_sets_build_on_deploy(self):
        config = Mock()
        config.get_deploy_log = Mock()

        deployer = Mock()
        env = Environment(config, "vagrant", deployer)

        env.deploy("EXAMPLE-PLAN", "EXAMPLE-PLAN-56")

        self.assertEquals("EXAMPLE-PLAN-56", env.get_build())
예제 #3
0
    def test_deploys_with_expected_arguments(self):
        config = Mock()
        config.get_deploy_log = Mock(return_value="/tmp/deploy.log")

        env = Environment(config, "production", "wget")
        env.deployer = Mock()
        env.deployer.deploy = Mock()

        env.deploy("EXAMPLE-PLAN", "EXAMPLE-PLAN-123")

        env.deployer.deploy.assert_called_with("EXAMPLE-PLAN-123", "/tmp/deploy.log")