mirror of
https://github.com/peeringdb/peeringdb.git
synced 2024-05-11 05:55:09 +00:00
Support 202103 (#966)
* Add check for existing pending affiliations to org * Fix message * 883 consolidation for deskpro tickets * add views tests * ipaddress normalization during search (#913) * remove unused imports * Update lat and long admin fields to not required * black formatting * relock pipfile * fix conditions for failing asn affil test * Update affiliation logic and add tests * make name search case insensitive * add asn to org_id lookup * black format * skip sync test while test.peeringdb.com is down Co-authored-by: Elliot Frank <elliot@20c.com> Co-authored-by: Stefan Pratter <stefan@20c.com>
This commit is contained in:
@@ -235,13 +235,19 @@ class AsnAutomationTestCase(TestCase):
|
||||
|
||||
for i in range(0, settings.MAX_USER_AFFILIATION_REQUESTS + 1):
|
||||
|
||||
# For this test we need the orgs to actually exist
|
||||
|
||||
models.Organization.objects.create(name=f"AFFILORG{i}", status="ok")
|
||||
request = self.factory.post(
|
||||
"/affiliate-to-org", data={"org": f"AFFILORG{i}"}
|
||||
)
|
||||
request.user = self.user_b
|
||||
request._dont_enforce_csrf_checks = True
|
||||
print("\n")
|
||||
print(i)
|
||||
response = pdbviews.view_affiliate_to_org(request)
|
||||
|
||||
print(response.content)
|
||||
if i < settings.MAX_USER_AFFILIATION_REQUESTS:
|
||||
assert response.status_code == 200
|
||||
else:
|
||||
|
Reference in New Issue
Block a user