3838)
3939
4040
41- def test_setInfoForDomains ():
42- """tests setInfoForDomains , setNewDomain and getDomainData """
43- db = ModuleFactory ().create_db_manager_obj (6385 , flush_db = True )
41+ def test_set_info_for_domains ():
42+ """tests set_info_for_domains , setNewDomain and get_domain_data """
43+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
4444 domain = "www.google.com"
4545 domain_data = {"threatintelligence" : "sample data" }
4646 db .set_info_for_domains (domain , domain_data )
@@ -51,7 +51,7 @@ def test_setInfoForDomains():
5151
5252
5353def test_subscribe ():
54- db = ModuleFactory ().create_db_manager_obj (6386 , flush_db = True )
54+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
5555 # invalid channel
5656 assert db .subscribe ("invalid_channel" ) is False
5757 # valid channel, shoud return a pubsub object
@@ -60,7 +60,7 @@ def test_subscribe():
6060
6161def test_profile_moddule_labels ():
6262 """tests set and get_profile_module_label"""
63- db = ModuleFactory ().create_db_manager_obj (6387 , flush_db = True )
63+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
6464 module_label = "malicious"
6565 module_name = "test"
6666 db .set_module_label_for_profile (profileid , module_name , module_label )
@@ -73,7 +73,7 @@ def test_add_mac_addr_with_new_ipv4():
7373 """
7474 adding an ipv4 to no cached ip
7575 """
76- db = ModuleFactory ().create_db_manager_obj (6388 , flush_db = True )
76+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
7777 ipv4 = "192.168.1.5"
7878 profileid_ipv4 = f"profile_{ ipv4 } "
7979 mac_addr = "00:00:5e:00:53:af"
@@ -96,7 +96,7 @@ def test_add_mac_addr_with_existing_ipv4():
9696 """
9797 adding an ipv4 to a cached ipv4
9898 """
99- db = ModuleFactory ().create_db_manager_obj (6389 , flush_db = True )
99+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
100100 ipv4 = "192.168.1.5"
101101 mac_addr = "00:00:5e:00:53:af"
102102 db .rdb .is_gw_mac = Mock (return_value = False )
@@ -115,7 +115,7 @@ def test_add_mac_addr_with_ipv6_association():
115115 """
116116 adding an ipv6 to a cached ipv4
117117 """
118- db = ModuleFactory ().create_db_manager_obj (6390 , flush_db = True )
118+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
119119 ipv4 = "192.168.1.5"
120120 profile_ipv4 = "profile_192.168.1.5"
121121 mac_addr = "00:00:5e:00:53:af"
@@ -143,7 +143,7 @@ def test_add_mac_addr_with_ipv6_association():
143143
144144
145145def test_get_the_other_ip_version ():
146- db = ModuleFactory ().create_db_manager_obj (6391 , flush_db = True )
146+ db = ModuleFactory ().create_db_manager_obj (6379 , flush_db = True )
147147 # profileid is ipv4
148148 ipv6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
149149 db .set_ipv6_of_profile (profileid , ipv6 )
0 commit comments