コード例 #1
0
    def test_initialize_container(self):
        """Test iptables container initialization"""
        iptables.initialize_container()

        treadmill.subproc.invoke.assert_called_with(
            ['iptables_restore'],
            cmd_input=self.iptables_empty_state,
            use_except=True,
        )
コード例 #2
0
    def test_initialize_container(self):
        """Test iptables container initialization"""
        iptables.initialize_container()

        treadmill.subproc.invoke.assert_called_with(
            ['iptables_restore'],
            cmd_input=open(self.IPTABLES_EMPTY_STATE).read(),
            use_except=True,
        )