1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/tests/test_generate_test_data.py
Stefan Pratter 87d5df3c22 Support 202311 fixes 3 (#1510)
* 1280 fixes

* cleanup and fixes for rir_status update, also add --reset

* linting

* comment

* fix tests and some adjustments

* fix mock according to new rir_status values

* more rir_status update fixes and safety checks
fix tests
2024-01-22 13:20:13 -06:00

16 lines
595 B
Python

from django.core.management import call_command
from django.test import TestCase
from peeringdb_server.models import REFTAG_MAP
class TestGenerateTestData(TestCase):
def test_run(self):
call_command("pdb_generate_test_data", limit=2, commit=True)
for reftag, cls in list(REFTAG_MAP.items()):
self.assertGreater(cls.objects.count(), 0)
for instance in cls.objects.all():
if hasattr(instance, "rir_status"):
print("RIR STATUS", instance.rir_status, type(instance.rir_status))
instance.full_clean()