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
Matt Griswold 5147028bee clean up / format / poetry (#1000)
* stub in poetry for pipenv

* re-add tester image

* add pre-commit / formatting

* fix ghactions

* revert test data whitespace, exclude tests/data

* revert ws

* decruft, rm tox/pipenv

* install dev packages for base image

* add lgtm config to force to py3
2021-07-10 10:12:35 -05:00

14 lines
455 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():
instance.full_clean()