Skip to content

Added authentication using email test case#180

Merged
tapaswenipathak merged 3 commits into
OpenSourceHelpCommunity:predevfrom
vaibhavsingh97:Patch4/addAutenticationTestCase
Dec 16, 2018
Merged

Added authentication using email test case#180
tapaswenipathak merged 3 commits into
OpenSourceHelpCommunity:predevfrom
vaibhavsingh97:Patch4/addAutenticationTestCase

Conversation

@vaibhavsingh97

Copy link
Copy Markdown
Member

Checklist

  • My branch is up-to-date with the upstream develop branch.
  • I have added necessary documentation (if appropriate).

Which issue does this PR fix?: fixes #179

Comment thread oshc/authentication/tests.py Outdated
self.assertEqual(response.status_code, 200)

class EmailLoginBackendTests(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

response = self.client.get(reverse("account_reset_password"))
self.assertEqual(response.status_code, 200)

class EmailLoginBackendTests(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

Comment thread oshc/authentication/tests.py Outdated
self.assertEqual(response.status_code, 302)

class PasswordResetViewTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

response = self.client.get(reverse("account_change_password"))
self.assertEqual(response.status_code, 302)

class PasswordResetViewTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

response = self.client.get(reverse("account_signup"))
self.assertEqual(response.status_code, 200)

class PasswordChangeViewTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

Comment thread oshc/authentication/tests.py Outdated
self.assertEqual(response.status_code, 200)

class RegisterViewTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

response = self.client.get(reverse("account_login"))
self.assertEqual(response.status_code, 200)

class RegisterViewTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

Comment thread oshc/authentication/tests.py Outdated
from __future__ import unicode_literals

from django.contrib.auth.models import User
from django.test import SimpleTestCase, TestCase

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'django.test.SimpleTestCase' imported but unused

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-22.6%) to 45.005% when pulling 5fd2ace on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@vaibhavsingh97 vaibhavsingh97 force-pushed the Patch4/addAutenticationTestCase branch from 9449f5f to 0b90bf2 Compare October 22, 2017 19:45
@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@tapasweni-pathak How could i include authentication in travis?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 67.619% when pulling 0b90bf2 on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 67.619% when pulling 0b90bf2 on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+10.2%) to 77.838% when pulling de90d18 on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@vaibhavsingh97 vaibhavsingh97 force-pushed the Patch4/addAutenticationTestCase branch from de90d18 to 2646934 Compare October 23, 2017 02:22
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+10.2%) to 77.838% when pulling 2646934 on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

Comment thread .travis.yml Outdated

script:
- coverage run --source='main' manage.py test --verbosity 2
- coverage run --source=main,authentication manage.py test --verbosity 2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if you say coverage run oshc/manage.py test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Then our coverage decreased to 42% because Travis makes virtual environment and test.py only covers some file

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@tapasweni-pathak please review and merge

@tapaswenipathak tapaswenipathak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We won't be going ahead with writing the app names specifically.
coverage run --source='.' manage.py test runs good on all apps but also on where we don't want it to.

Will merge this with a .coveragerc and including the excludes of not important files/directories; in process here.

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@tapasweni-pathak So i will push .coveragerc 👍

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+9.3%) to 76.884% when pulling 5170211 on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-10.5%) to 57.104% when pulling d4dfa9d on vaibhavsingh97:Patch4/addAutenticationTestCase into f01f550 on OpenSourceHelpCommunity:predev.

@vaibhavsingh97

Copy link
Copy Markdown
Member Author

@tapasweni-pathak Coverage reduced as it's checking the whole code

@jarifibrahim

Copy link
Copy Markdown
Member

@vaibhavsingh97 Ping! Are you still working on this?

@tapaswenipathak tapaswenipathak merged commit d833029 into OpenSourceHelpCommunity:predev Dec 16, 2018
@vaibhavsingh97 vaibhavsingh97 deleted the Patch4/addAutenticationTestCase branch December 17, 2018 09:02
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.

Add test cases

5 participants