]> git.ipfire.org Git - location/libloc.git/commitdiff
tests: Break after exporting 1000 networks
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Mar 2022 15:29:49 +0000 (15:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Mar 2022 15:31:23 +0000 (15:31 +0000)
Otherwise this test runs for forever

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/python/test-export.py

index cef87b3a2773e8c956de4baeaa983c6aa0c1a9c0..419b10500ab95db3eaee168bce1131257cc6162c 100755 (executable)
@@ -41,7 +41,11 @@ class Test(unittest.TestCase):
                """
                        Lists all networks but flattened
                """
-               for network in self.db.networks_flattened:
+               for i, network in enumerate(self.db.networks_flattened):
+                       # Break after the first 1000 iterations
+                       if i >= 1000:
+                               break
+
                        print(network)