forked from Uninett/nav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Uninett#2990 from lunkwill42/bugfix/ipam-tree-api-…
…crash Fix incorrect handling of non-existant scopes
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix IPAM API crash bug that caused unnecessary error reports sent as e-mail to site admins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class TestPrefixViewSet: | ||
def test_when_prefix_address_is_unknown_it_should_not_crash(self, client): | ||
response = client.get( | ||
"/ipam/api/", | ||
follow=True, | ||
data={ | ||
"net_type": "all", | ||
"within": "192.168.42.0/24", | ||
"show_all": "True", | ||
}, | ||
) | ||
assert response.status_code == 200 |