1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

June updates (#751)

* Add pointer from API docs to tutorial #650

* Sorting by clicking table headers should use local-compare #356

* Mark IXP peering LAN as bogon #352

* Add help text to "Add (Facility, Network, Exchange)" tab #669

* Add Looking Glass field to the IX object #672

* Add read-only Superuser #679

* Make spelling of traffic levels consistent #519 (#723)

* Offer 2FA (#290)

* Show "Last Updated" fields on fac, ix, org records (#526)

* Enable sort and reverse sort of IP column in IX display (#72)

* IRR validation not handling unexpected characters gracefully (#712)

* Support alternative direction of writing, e.g. Arabic (#618)

* Undeleting an ixlan with an emtpy IPv4 XOR IPv6 field throws a silly error (#644)

* Changing org while adding net results in 500 #654

* missing delete button for organisations (#121)

* When changing owner of an ix admin GUI borks because of "Ixlan for exchange already exists" #666

* Selection should only present undeleted objects (#664)

* change default encoding of API calls to 'utf-8' #663

* Posting https://www.peeringdb.com onto social media doesn't select a good preview image #537

* Revert "Add Looking Glass field to the IX object #672"

This reverts commit 4daf2520043c241fabe9a521757efa86a274e28a.

Conflicts:
	peeringdb_server/migrations/0037_ix_looking_glass.py
	peeringdb_server/views.py

* 500 Internal Error when creating IX where prefix already exists elsewhere #718

* Fix graceful restore of soft-deleted objects with translation active (#580)

* Don't return any POC data with status=deleted #569
Hard delete soft-deleted pocs after grace period #566

* django-peeringdb from github@2.0.0.2-beta

Co-authored-by: Stefan Pratter <stefan@20c.com>
This commit is contained in:
Matt Griswold
2020-06-24 12:55:01 -05:00
committed by GitHub
parent 09b4759b02
commit af6974e3d3
60 changed files with 1797 additions and 336 deletions

View File

@@ -89,14 +89,14 @@ class UserTests(TestCase):
self.assertEqual(self.user_b.is_org_admin(self.org_a), False)
self.assertEqual(self.user_b.is_org_member(self.org_a), False)
def test_is_verified(self):
def test_is_verified_user(self):
"""
Test User.is_verified
Test User.is_verified_user
"""
self.assertEqual(self.user_a.is_verified, True)
self.assertEqual(self.user_b.is_verified, False)
self.assertEqual(self.user_c.is_verified, False)
self.assertEqual(self.user_a.is_verified_user, True)
self.assertEqual(self.user_b.is_verified_user, False)
self.assertEqual(self.user_c.is_verified_user, False)
def test_set_verified(self):
"""
@@ -107,7 +107,7 @@ class UserTests(TestCase):
self.user_c.refresh_from_db()
self.assertEqual(self.user_c.status, "ok")
self.assertEqual(self.user_c.is_verified, True)
self.assertEqual(self.user_c.is_verified_user, True)
self.assertEqual(self.user_c.groups.filter(name="guest").exists(), False)
self.assertEqual(self.user_c.groups.filter(name="user").exists(), True)
@@ -121,7 +121,7 @@ class UserTests(TestCase):
self.user_c.refresh_from_db()
self.assertEqual(self.user_c.status, "pending")
self.assertEqual(self.user_c.is_verified, False)
self.assertEqual(self.user_c.is_verified_user, False)
self.assertEqual(self.user_c.groups.filter(name="guest").exists(), True)
self.assertEqual(self.user_c.groups.filter(name="user").exists(), False)
@@ -229,14 +229,25 @@ class UserTests(TestCase):
self.assertEqual(resp.status_code, 400)
def test_login_redirect(self):
data = {"next": "/org/1", "username": "user_d", "password": "user_d"}
data = {
"next": "/org/1",
"auth-username": "user_d",
"auth-password": "user_d",
"login_view-current_step": "auth"
}
C = Client()
resp = C.post("/auth", data, follow=True)
resp = C.post("/account/login/", data, follow=True)
self.assertEqual(resp.redirect_chain, [("/org/1", 302)])
data = {"next": "/logout", "username": "user_d", "password": "user_d"}
data = {
"next": "/logout",
"auth-username": "user_d",
"auth-password": "user_d",
"login_view-current_step": "auth"
}
C = Client()
resp = C.post("/auth", data, follow=True)
resp = C.post("/account/login/", data, follow=True)
self.assertEqual(resp.redirect_chain, [("/", 302)])
self.assertEqual(resp.context["user"].is_authenticated, True)