Skip to content

Commit

Permalink
Add test hcaptcha repsonse to test regiatration test
Browse files Browse the repository at this point in the history
  • Loading branch information
asset-web committed Jul 14, 2023
1 parent ec938e2 commit 6da5cdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/base_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def setUp(self):
"""Override set up to create test users of each Django default role type."""
super(BaseTestCase, self).setUp()
self.client = Client()
self.hcaptcha_response = "10000000-aaaa-bbbb-cccc-000000000001"
self.user = User.objects.create_user(id=999,
username='may',
email='may@example.com',
Expand Down
3 changes: 2 additions & 1 deletion tests/test_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def test_register_page(self):
{"username": "testuser1",
"email": "bob@example.com",
"password1": "THISISJUSTATEST",
"password2": "THISISJUSTATEST"},
"password2": "THISISJUSTATEST",
"h-captcha-response": self.hcaptcha_response},
follow=True)

self.assertContains(response, "Your registration is complete.", msg_prefix=str(response.content))
Expand Down

0 comments on commit 6da5cdd

Please sign in to comment.