Esempio n. 1
0
    def test_node_property(self, node_docker_commands):
        subject = Docker('mario', 27)

        subject.node.shell()

        self.mock_node_docker_commands.assert_called_with(
            subject.machine_name(), subject.get_external_ip)
        self.mock_node_docker_commands.return_value.shell.assert_called_with()
Esempio n. 2
0
    def test_traffic_property(self, traffic_docker_commands):
        subject = Docker('mario', 27)

        self.mock_traffic_docker_commands.assert_called_with(
            subject.machine_name())
Esempio n. 3
0
    def test_construction_properties(self):
        subject = Docker('mario', 27)

        assert subject.machine_name() == 'mario'
        assert subject.instance_index == 27