@@ -141,17 +141,15 @@ def test_update_firewall_lists_no_token(connection_manager):
141141 connection_manager .token = None
142142 update_firewall_lists (connection_manager )
143143 # No changes should be made, so we check the initial state
144- assert len (connection_manager .conf .bypassed_ips .blocked_subnets ) == 0
145- assert len (connection_manager .conf .bypassed_ips .blocked_addresses ) == 0
144+ assert connection_manager .conf .bypassed_ips .is_empty ()
146145
147146
148147def test_update_firewall_lists_serverless (connection_manager ):
149148 # Set serverless to True
150149 connection_manager .serverless = True
151150 update_firewall_lists (connection_manager )
152151 # No changes should be made, so we check the initial state
153- assert len (connection_manager .conf .bypassed_ips .blocked_subnets ) == 0
154- assert len (connection_manager .conf .bypassed_ips .blocked_addresses ) == 0
152+ assert connection_manager .conf .bypassed_ips .is_empty ()
155153
156154
157155def test_update_firewall_lists_api_failure (connection_manager ):
@@ -163,8 +161,7 @@ def fetch_firewall_lists(self, token):
163161 connection_manager .api = FailingApi ()
164162 update_firewall_lists (connection_manager )
165163 # No changes should be made, so we check the initial state
166- assert len (connection_manager .conf .bypassed_ips .blocked_subnets ) == 0
167- assert len (connection_manager .conf .bypassed_ips .blocked_addresses ) == 0
164+ assert connection_manager .conf .bypassed_ips .is_empty ()
168165
169166
170167def test_update_firewall_lists_exception_handling (connection_manager ):
@@ -176,5 +173,4 @@ def fetch_firewall_lists(self, token):
176173 connection_manager .api = ExceptionApi ()
177174 update_firewall_lists (connection_manager )
178175 # No changes should be made, so we check the initial state
179- assert len (connection_manager .conf .bypassed_ips .blocked_subnets ) == 0
180- assert len (connection_manager .conf .bypassed_ips .blocked_addresses ) == 0
176+ assert connection_manager .conf .bypassed_ips .is_empty ()
0 commit comments