1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
* remove log file writing from migration

* run tests on mysql

* fix tests (pt.1)

* fix tests (pt.2)

* fix all user_id errors in tests

* Fix geocode typo

* More test changes for mysql id issues

* Add coverage config that defines coverage db should go inside test folder

* update docs

* fix mysql user

* fix tests cli

* add mysql collate settings

* docs

* fix sync

* fix sync

* docs

* remove debug output

* remove XXX

* interim commit to move to dev box

* mv db local, rm after run

* updates for 724

* note layer error message and work around

* fix travis

* chown tests

* more travis fixes

* travis: touch Ctl/dev/.env

* write coverage report to ./coverage

* clean up docs

* formatting

Co-authored-by: Stefan Pratter <stefan@20c.com>
Co-authored-by: Elliot Frank <elliot@20c.com>
This commit is contained in:
Matt Griswold
2020-12-03 19:10:02 +00:00
committed by GitHub
parent b2fe79cdcd
commit 299016282e
42 changed files with 494 additions and 726 deletions

View File

@@ -4,12 +4,14 @@ import pytest
from django.test import TestCase
from django.contrib.auth.models import Group
from django.db import IntegrityError
from django.conf import settings
import peeringdb_server.models as models
import reversion
class VeriQueueTests(TestCase):
"""
Test VerificationQueue creation and resolve
@@ -22,8 +24,12 @@ class VeriQueueTests(TestCase):
for which it is enabled
"""
guest_group = Group.objects.create(name="guest")
user_group = Group.objects.create(name="user")
cls.guest_group = Group.objects.create(name="guest", id=settings.GUEST_GROUP_ID)
cls.user_group = Group.objects.create(name="user", id=settings.USER_GROUP_ID)
settings.USER_GROUP_ID = cls.user_group.id
settings.GUEST_GROUP_ID = cls.guest_group.id
cls.inst = {}
org = models.Organization.objects.create(name="Test", status="pending")
@@ -69,7 +75,7 @@ class VeriQueueTests(TestCase):
vqi.user = user
vqi.save()
self.assertEqual(
qs.filter(subject=f"[test]{vqi.content_type} - {inst}").exists(),
qs.filter(subject=f"[{settings.RELEASE_ENV}] {vqi.content_type} - {inst}").exists(),
True,
)