def test_cookie_is_different_in_context(self):
    default_cookie = self.firewall.int_br.br.default_cookie
    with self.firewall.update_cookie_context():
        self.firewall._add_flow(actions='drop')
        update_cookie = self.firewall._update_cookie
    self.firewall._add_flow(actions='drop')
    expected_calls = [mock.call(mock.ANY, process_input=('hard_timeout=0,idle_timeout=0,priority=1,cookie=%d,actions=drop' % cookie), run_as_root=mock.ANY) for cookie in (update_cookie, default_cookie)]
    self.execute.assert_has_calls(expected_calls)
def test_cookie_is_different_in_context(self):
    default_cookie = self.firewall.int_br.br.default_cookie
    with self.firewall.update_cookie_context():
        self.firewall._add_flow(actions='drop')
        update_cookie = self.firewall._update_cookie
    self.firewall._add_flow(actions='drop')
    expected_calls = [mock.call(mock.ANY, process_input=('hard_timeout=0,idle_timeout=0,priority=1,cookie=%d,actions=drop' % cookie), run_as_root=mock.ANY) for cookie in (update_cookie, default_cookie)]
    self.execute.assert_has_calls(expected_calls)