From b75f3f2ba2de91d8c62beb2a5223e51f2ed60b5e Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342.local> Date: Tue, 19 Mar 2024 10:20:53 +0000 Subject: [PATCH] Update fixtures for the iptrunk network Use custom method in faker to avoid random allocation of /32 addresses as network addresses --- test/fixtures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures.py b/test/fixtures.py index 9575cdfb..0800edec 100644 --- a/test/fixtures.py +++ b/test/fixtures.py @@ -250,8 +250,8 @@ def iptrunk_subscription_factory(iptrunk_side_subscription_factory, faker, geant geant_s_sid = geant_s_sid or faker.geant_sid() iptrunk_description = iptrunk_description or faker.sentence() iptrunk_isis_metric = iptrunk_isis_metric or faker.pyint() - iptrunk_ipv4_network = iptrunk_ipv4_network or faker.ipv4(network=True) - iptrunk_ipv6_network = iptrunk_ipv6_network or faker.ipv6(network=True) + iptrunk_ipv4_network = iptrunk_ipv4_network or faker.ipv4_network(max_subnet=31) + iptrunk_ipv6_network = iptrunk_ipv6_network or faker.ipv6_network(max_subnet=126) iptrunk_minimum_links = 1 iptrunk_side_a = iptrunk_side_subscription_factory() iptrunk_side_b = iptrunk_side_subscription_factory() -- GitLab