def test_force_attr_revision(self): sock = get_ipset_socket(attr_revision=2) myset = WiSet(name=self.name, attr_type="hash:net", sock=sock) myset.create() assert load_ipset(self.name, sock=sock).revision >= 2 myset.destroy() sock.close()
def test_force_attr_revision(self): sock = get_ipset_socket(attr_revision=2) myset = WiSet(name=self.name, attr_type="hash:net", sock=sock) myset.create() assert load_ipset(self.name, sock=sock).revision >= 2 myset.destroy() sock.close()
def test_ipset_context(self): before_count = COUNT["count"] func = [self.test_create_one_ipset, self.test_create_ipset_twice, self.test_check_ipset_stats, self.test_list_on_large_set, self.test_remove_entry, self.test_flush, self.test_basic_attribute_reads, self.test_replace_content, self.test_hash_net_ipset, self.test_stats_consistency, self.test_list_in, self.test_hashnet_with_comment, self.test_revision] for fun in func: sock = get_ipset_socket() fun(sock=sock) assert before_count == COUNT['count'] sock.close()