Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[urls] creating a new user gave NoReverseMatch (solves #7) #9

Merged
merged 1 commit into from
Nov 23, 2018

Conversation

shashwat1002
Copy link
Contributor

This code effectively adds a test corresponding to this error(issue #7) and includes allauth urls to solve the problem.
Fixes #7

@coveralls
Copy link

coveralls commented Nov 21, 2018

Pull Request Test Coverage Report for Build 12

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.987%

Totals Coverage Status
Change from base Build 8: 0.0%
Covered Lines: 146
Relevant Lines: 149

💛 - Coveralls

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @shashwat1002, some minor changes requested, see below

openwisp_ipam/tests.py Outdated Show resolved Hide resolved
openwisp_ipam/tests.py Outdated Show resolved Hide resolved
@@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['testserver', 'localhost',]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nemesisdesign What about this? Shouldn't this do to local_settings.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atb00ker , my test will not pass if I don't add this. Because I'm using django.test.Client which uses a testserver. Since the build won't work without this, I added it to the main settings file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atb00ker thanks for spotting this, it is indeed symptom of an issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once you address the previous issue you should not need this change anymore, although you can keep localhost

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there..

Check your commit message, seems a [ is missing. I'd also simplify it to:

[urls] Fixed NoReverseMatch on user creation #7 

Fixes #7

@@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['testserver', 'localhost',]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once you address the previous issue you should not need this change anymore, although you can keep localhost

@shashwat1002
Copy link
Contributor Author

@nemesisdesign , which issue are you referring to?

@shashwat1002
Copy link
Contributor Author

I tried running tests again, without testserver, it seems to work now. I don't understand why, it was suggesting that I add 'testserver' to allowed hosts before. Nonetheless I'm removing that and committing.

openwisp_ipam/tests.py Outdated Show resolved Hide resolved
@shashwat1002
Copy link
Contributor Author

@nemesisdesign , made the changes.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nemesifier nemesifier merged commit d6c3283 into openwisp:master Nov 23, 2018
@shashwat1002 shashwat1002 deleted the issue#7_admin_create_user branch November 24, 2018 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants