|  | @@ 365-382 (lines=18) @@ | 
                                                            
                                    | 362 |  |         get_circuits.assert_called_with(archived=False) | 
                                                            
                                    | 363 |  |         self.assertEqual(json.loads(response.data), expected_result) | 
                                                            
                                    | 364 |  |  | 
                                                            
                                    | 365 |  |     def test_list_with_archived_circuits_archived(self): | 
                                                            
                                    | 366 |  |         """Test if list circuits only archived circuits.""" | 
                                                            
                                    | 367 |  |         circuits = { | 
                                                            
                                    | 368 |  |             'circuits': | 
                                                            
                                    | 369 |  |             { | 
                                                            
                                    | 370 |  |                 "1": {"name": "circuit_1", "archived": True}, | 
                                                            
                                    | 371 |  |             } | 
                                                            
                                    | 372 |  |         } | 
                                                            
                                    | 373 |  |         get_circuits = self.napp.mongo_controller.get_circuits | 
                                                            
                                    | 374 |  |         get_circuits.return_value = circuits | 
                                                            
                                    | 375 |  |  | 
                                                            
                                    | 376 |  |         api = self.get_app_test_client(self.napp) | 
                                                            
                                    | 377 |  |         url = f"{self.server_name_url}/v2/evc/?archived=true" | 
                                                            
                                    | 378 |  |  | 
                                                            
                                    | 379 |  |         response = api.get(url) | 
                                                            
                                    | 380 |  |         get_circuits.assert_called_with(archived=True) | 
                                                            
                                    | 381 |  |         expected_result = {"1": circuits["circuits"]["1"]} | 
                                                            
                                    | 382 |  |         self.assertEqual(json.loads(response.data), expected_result) | 
                                                            
                                    | 383 |  |  | 
                                                            
                                    | 384 |  |     def test_list_with_archived_circuits_all(self): | 
                                                            
                                    | 385 |  |         """Test if list circuits return all circuits.""" | 
                                                                                
                                |  | @@ 348-363 (lines=16) @@ | 
                                                            
                                    | 345 |  |         expected_result = circuits["circuits"] | 
                                                            
                                    | 346 |  |         self.assertEqual(json.loads(response.data), expected_result) | 
                                                            
                                    | 347 |  |  | 
                                                            
                                    | 348 |  |     def test_list_with_circuits_stored(self): | 
                                                            
                                    | 349 |  |         """Test if list circuits return all circuits stored.""" | 
                                                            
                                    | 350 |  |         circuits = { | 
                                                            
                                    | 351 |  |             'circuits': | 
                                                            
                                    | 352 |  |             {"1": {"name": "circuit_1"}, "2": {"name": "circuit_2"}} | 
                                                            
                                    | 353 |  |         } | 
                                                            
                                    | 354 |  |         get_circuits = self.napp.mongo_controller.get_circuits | 
                                                            
                                    | 355 |  |         get_circuits.return_value = circuits | 
                                                            
                                    | 356 |  |  | 
                                                            
                                    | 357 |  |         api = self.get_app_test_client(self.napp) | 
                                                            
                                    | 358 |  |         url = f"{self.server_name_url}/v2/evc/" | 
                                                            
                                    | 359 |  |  | 
                                                            
                                    | 360 |  |         response = api.get(url) | 
                                                            
                                    | 361 |  |         expected_result = circuits["circuits"] | 
                                                            
                                    | 362 |  |         get_circuits.assert_called_with(archived=False) | 
                                                            
                                    | 363 |  |         self.assertEqual(json.loads(response.data), expected_result) | 
                                                            
                                    | 364 |  |  | 
                                                            
                                    | 365 |  |     def test_list_with_archived_circuits_archived(self): | 
                                                            
                                    | 366 |  |         """Test if list circuits only archived circuits.""" |