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

Better error message when user tries to add a record (basically network) with status "deleted" (github-288) (#603)

This commit is contained in:
Matt Griswold
2019-11-16 21:30:34 -06:00
committed by GitHub
parent cc5d6b5ea4
commit e09bbae066
2 changed files with 19 additions and 0 deletions

View File

@@ -1106,6 +1106,16 @@ class TestJSON(unittest.TestCase):
"asn": 9999999
}}, test_success=False)
##########################################################################
def test_org_admin_002_POST_net_deleted(self):
data = self.make_data_net(asn=SHARED["net_rw_dupe_deleted"].asn)
with self.assertRaises(InvalidRequestException) as exc:
r_data = self.db_org_admin.create("net", data, return_response=True)
assert exc.exception.extra["asn"].find("Network has been deleted. Please contact") == 0
##########################################################################
def test_org_admin_002_POST_PUT_DELETE_as_set(self):