{"action":"created","comment":{"url":"https://api.github.com/repos/macropin/django-registration/pulls/comments/70977842","id":70977842,"diff_hunk":"@@ -471,17 +474,332 @@ def test_resend_activation_email_expired_user(self):\n         Test the scenario where user tries to resend activation code\n         to the expired user's email\n         \"\"\"\n-        new_user = RegistrationProfile.objects.create_inactive_user(\n+        new_user = self.registration_profile.objects.create_inactive_user(\n             site=Site.objects.get_current(), send_email=False, **self.user_info)\n         new_user.date_joined -= datetime.timedelta(\n             days=settings.ACCOUNT_ACTIVATION_DAYS + 1)\n         new_user.save()\n \n-        profile = RegistrationProfile.objects.get(user=new_user)\n+        profile = self.registration_profile.objects.get(user=new_user)\n         self.assertTrue(profile.activation_key_expired())\n \n-        self.assertFalse(RegistrationProfile.objects.resend_activation_mail(\n+        self.assertFalse(self.registration_profile.objects.resend_activation_mail(\n             email=self.user_info['email'],\n             site=Site.objects.get_current(),\n         ))\n         self.assertEqual(len(mail.outbox), 0)\n+\n+\n+class SupervisedRegistrationModelTests(RegistrationModelTests):\n+    \"\"\"\n+    Test the model and manager used in the admin_approval backend.\n+\n+    \"\"\"\n+\n+    user_info = {'username': 'alice',\n+                 'password': 'swordfish',\n+                 'email': 'alice@example.com'}\n+\n+    registration_profile = SupervisedRegistrationProfile\n+\n+    def setUp(self):\n+        self.old_activation = getattr(settings,\n+                                      'ACCOUNT_ACTIVATION_DAYS', None)\n+        self.old_reg_email = getattr(settings,\n+                                     'REGISTRATION_DEFAULT_FROM_EMAIL', None)\n+        self.old_email_html = getattr(settings,\n+                                      'REGISTRATION_EMAIL_HTML', None)\n+        self.old_django_email = getattr(settings,\n+                                        'DEFAULT_FROM_EMAIL', None)\n+        self.old_admins = getattr(settings,\n+                                  'ADMINS', None)\n+\n+        settings.ACCOUNT_ACTIVATION_DAYS = 7\n+        settings.REGISTRATION_DEFAULT_FROM_EMAIL = 'registration@email.com'\n+        settings.REGISTRATION_EMAIL_HTML = True\n+        settings.DEFAULT_FROM_EMAIL = 'django@email.com'\n+        settings.ADMINS = (\n+            ('T-Rex', 'admin1@iamtrex.com'),\n+            ('Flea', 'admin2@iamaflea.com')\n+        )\n+\n+    def tearDown(self):\n+        settings.ACCOUNT_ACTIVATION_DAYS = self.old_activation\n+        settings.REGISTRATION_DEFAULT_FROM_EMAIL = self.old_reg_email\n+        settings.REGISTRATION_EMAIL_HTML = self.old_email_html\n+        settings.DEFAULT_FROM_EMAIL = self.old_django_email\n+\n+    def test_valid_activation(self):","path":"registration/tests/models.py","position":null,"original_position":473,"commit_id":"a53405d8c295f98b6d51543b416f5c4f4e66b967","original_commit_id":"4d29c9b22f8484482ed4857ba6e60f7210d0153b","user":{"login":"joshblum","id":1144020,"avatar_url":"https://avatars.githubusercontent.com/u/1144020?v=3","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"body":"ok cool let's leave as is then, can you add a comment noting the difference?\r\n","created_at":"2016-07-15T14:04:14Z","updated_at":"2016-07-15T14:04:14Z","html_url":"https://github.com/macropin/django-registration/pull/184#discussion_r70977842","pull_request_url":"https://api.github.com/repos/macropin/django-registration/pulls/184","_links":{"self":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/comments/70977842"},"html":{"href":"https://github.com/macropin/django-registration/pull/184#discussion_r70977842"},"pull_request":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/184"}}},"pull_request":{"url":"https://api.github.com/repos/macropin/django-registration/pulls/184","id":72710460,"html_url":"https://github.com/macropin/django-registration/pull/184","diff_url":"https://github.com/macropin/django-registration/pull/184.diff","patch_url":"https://github.com/macropin/django-registration/pull/184.patch","issue_url":"https://api.github.com/repos/macropin/django-registration/issues/184","number":184,"state":"open","locked":false,"title":"Add 3-step registration workflow by implementing another registration backend","user":{"login":"sergafts","id":14074326,"avatar_url":"https://avatars.githubusercontent.com/u/14074326?v=3","gravatar_id":"","url":"https://api.github.com/users/sergafts","html_url":"https://github.com/sergafts","followers_url":"https://api.github.com/users/sergafts/followers","following_url":"https://api.github.com/users/sergafts/following{/other_user}","gists_url":"https://api.github.com/users/sergafts/gists{/gist_id}","starred_url":"https://api.github.com/users/sergafts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergafts/subscriptions","organizations_url":"https://api.github.com/users/sergafts/orgs","repos_url":"https://api.github.com/users/sergafts/repos","events_url":"https://api.github.com/users/sergafts/events{/privacy}","received_events_url":"https://api.github.com/users/sergafts/received_events","type":"User","site_admin":false},"body":"This includes the changes required to implement a 3-step registration workflow.\r\n\r\n1) User registers an account - is emailed with an activation token\r\n2) User activates the account - site administrators are emailed in order to approve the user's newly created account\r\n3) Administrators approve user's account - User is emailed and can now log in.\r\n\r\nIt contains a new registration backend which has been tested with all the previous tests and some newly added to test the new functionality.\r\n\r\nFor more information refer to the commit message. If the changes are not clear enough, I would be happy to provide documentation too. I have not done so yet as I would like some feedback first.\r\n\r\nI am available to answer any possible questions. Thank you.","created_at":"2016-06-06T13:38:29Z","updated_at":"2016-07-15T14:04:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7a28652eed961d0f0f248ad06f9da630a577150","assignee":{"login":"joshblum","id":1144020,"avatar_url":"https://avatars.githubusercontent.com/u/1144020?v=3","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"assignees":[{"login":"joshblum","id":1144020,"avatar_url":"https://avatars.githubusercontent.com/u/1144020?v=3","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/macropin/django-registration/milestones/2","html_url":"https://github.com/macropin/django-registration/milestones/1.5","labels_url":"https://api.github.com/repos/macropin/django-registration/milestones/2/labels","id":1674045,"number":2,"title":"1.5","description":"","creator":{"login":"dicato","id":542728,"avatar_url":"https://avatars.githubusercontent.com/u/542728?v=3","gravatar_id":"","url":"https://api.github.com/users/dicato","html_url":"https://github.com/dicato","followers_url":"https://api.github.com/users/dicato/followers","following_url":"https://api.github.com/users/dicato/following{/other_user}","gists_url":"https://api.github.com/users/dicato/gists{/gist_id}","starred_url":"https://api.github.com/users/dicato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicato/subscriptions","organizations_url":"https://api.github.com/users/dicato/orgs","repos_url":"https://api.github.com/users/dicato/repos","events_url":"https://api.github.com/users/dicato/events{/privacy}","received_events_url":"https://api.github.com/users/dicato/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":2,"state":"open","created_at":"2016-03-30T13:33:30Z","updated_at":"2016-06-07T03:56:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/macropin/django-registration/pulls/184/commits","review_comments_url":"https://api.github.com/repos/macropin/django-registration/pulls/184/comments","review_comment_url":"https://api.github.com/repos/macropin/django-registration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/macropin/django-registration/issues/184/comments","statuses_url":"https://api.github.com/repos/macropin/django-registration/statuses/a53405d8c295f98b6d51543b416f5c4f4e66b967","head":{"label":"sergafts:master","ref":"master","sha":"a53405d8c295f98b6d51543b416f5c4f4e66b967","user":{"login":"sergafts","id":14074326,"avatar_url":"https://avatars.githubusercontent.com/u/14074326?v=3","gravatar_id":"","url":"https://api.github.com/users/sergafts","html_url":"https://github.com/sergafts","followers_url":"https://api.github.com/users/sergafts/followers","following_url":"https://api.github.com/users/sergafts/following{/other_user}","gists_url":"https://api.github.com/users/sergafts/gists{/gist_id}","starred_url":"https://api.github.com/users/sergafts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergafts/subscriptions","organizations_url":"https://api.github.com/users/sergafts/orgs","repos_url":"https://api.github.com/users/sergafts/repos","events_url":"https://api.github.com/users/sergafts/events{/privacy}","received_events_url":"https://api.github.com/users/sergafts/received_events","type":"User","site_admin":false},"repo":{"id":59745301,"name":"django-registration","full_name":"sergafts/django-registration","owner":{"login":"sergafts","id":14074326,"avatar_url":"https://avatars.githubusercontent.com/u/14074326?v=3","gravatar_id":"","url":"https://api.github.com/users/sergafts","html_url":"https://github.com/sergafts","followers_url":"https://api.github.com/users/sergafts/followers","following_url":"https://api.github.com/users/sergafts/following{/other_user}","gists_url":"https://api.github.com/users/sergafts/gists{/gist_id}","starred_url":"https://api.github.com/users/sergafts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergafts/subscriptions","organizations_url":"https://api.github.com/users/sergafts/orgs","repos_url":"https://api.github.com/users/sergafts/repos","events_url":"https://api.github.com/users/sergafts/events{/privacy}","received_events_url":"https://api.github.com/users/sergafts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sergafts/django-registration","description":"django-registration (redux) now with Django 1.7/1.8/1.9 & Python 3 support","fork":true,"url":"https://api.github.com/repos/sergafts/django-registration","forks_url":"https://api.github.com/repos/sergafts/django-registration/forks","keys_url":"https://api.github.com/repos/sergafts/django-registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergafts/django-registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergafts/django-registration/teams","hooks_url":"https://api.github.com/repos/sergafts/django-registration/hooks","issue_events_url":"https://api.github.com/repos/sergafts/django-registration/issues/events{/number}","events_url":"https://api.github.com/repos/sergafts/django-registration/events","assignees_url":"https://api.github.com/repos/sergafts/django-registration/assignees{/user}","branches_url":"https://api.github.com/repos/sergafts/django-registration/branches{/branch}","tags_url":"https://api.github.com/repos/sergafts/django-registration/tags","blobs_url":"https://api.github.com/repos/sergafts/django-registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergafts/django-registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergafts/django-registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergafts/django-registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergafts/django-registration/statuses/{sha}","languages_url":"https://api.github.com/repos/sergafts/django-registration/languages","stargazers_url":"https://api.github.com/repos/sergafts/django-registration/stargazers","contributors_url":"https://api.github.com/repos/sergafts/django-registration/contributors","subscribers_url":"https://api.github.com/repos/sergafts/django-registration/subscribers","subscription_url":"https://api.github.com/repos/sergafts/django-registration/subscription","commits_url":"https://api.github.com/repos/sergafts/django-registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergafts/django-registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergafts/django-registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergafts/django-registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergafts/django-registration/contents/{+path}","compare_url":"https://api.github.com/repos/sergafts/django-registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergafts/django-registration/merges","archive_url":"https://api.github.com/repos/sergafts/django-registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergafts/django-registration/downloads","issues_url":"https://api.github.com/repos/sergafts/django-registration/issues{/number}","pulls_url":"https://api.github.com/repos/sergafts/django-registration/pulls{/number}","milestones_url":"https://api.github.com/repos/sergafts/django-registration/milestones{/number}","notifications_url":"https://api.github.com/repos/sergafts/django-registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergafts/django-registration/labels{/name}","releases_url":"https://api.github.com/repos/sergafts/django-registration/releases{/id}","deployments_url":"https://api.github.com/repos/sergafts/django-registration/deployments","created_at":"2016-05-26T11:33:02Z","updated_at":"2016-05-26T11:33:03Z","pushed_at":"2016-07-15T09:40:52Z","git_url":"git://github.com/sergafts/django-registration.git","ssh_url":"git@github.com:sergafts/django-registration.git","clone_url":"https://github.com/sergafts/django-registration.git","svn_url":"https://github.com/sergafts/django-registration","homepage":"http://django-registration-redux.readthedocs.org","size":1298,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"macropin:master","ref":"master","sha":"a1b31a087027502c0c989dfcbf658c617cb28f3c","user":{"login":"macropin","id":247192,"avatar_url":"https://avatars.githubusercontent.com/u/247192?v=3","gravatar_id":"","url":"https://api.github.com/users/macropin","html_url":"https://github.com/macropin","followers_url":"https://api.github.com/users/macropin/followers","following_url":"https://api.github.com/users/macropin/following{/other_user}","gists_url":"https://api.github.com/users/macropin/gists{/gist_id}","starred_url":"https://api.github.com/users/macropin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macropin/subscriptions","organizations_url":"https://api.github.com/users/macropin/orgs","repos_url":"https://api.github.com/users/macropin/repos","events_url":"https://api.github.com/users/macropin/events{/privacy}","received_events_url":"https://api.github.com/users/macropin/received_events","type":"User","site_admin":false},"repo":{"id":19168375,"name":"django-registration","full_name":"macropin/django-registration","owner":{"login":"macropin","id":247192,"avatar_url":"https://avatars.githubusercontent.com/u/247192?v=3","gravatar_id":"","url":"https://api.github.com/users/macropin","html_url":"https://github.com/macropin","followers_url":"https://api.github.com/users/macropin/followers","following_url":"https://api.github.com/users/macropin/following{/other_user}","gists_url":"https://api.github.com/users/macropin/gists{/gist_id}","starred_url":"https://api.github.com/users/macropin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macropin/subscriptions","organizations_url":"https://api.github.com/users/macropin/orgs","repos_url":"https://api.github.com/users/macropin/repos","events_url":"https://api.github.com/users/macropin/events{/privacy}","received_events_url":"https://api.github.com/users/macropin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/macropin/django-registration","description":"django-registration (redux) now with Django 1.7/1.8/1.9 & Python 3 support","fork":false,"url":"https://api.github.com/repos/macropin/django-registration","forks_url":"https://api.github.com/repos/macropin/django-registration/forks","keys_url":"https://api.github.com/repos/macropin/django-registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macropin/django-registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macropin/django-registration/teams","hooks_url":"https://api.github.com/repos/macropin/django-registration/hooks","issue_events_url":"https://api.github.com/repos/macropin/django-registration/issues/events{/number}","events_url":"https://api.github.com/repos/macropin/django-registration/events","assignees_url":"https://api.github.com/repos/macropin/django-registration/assignees{/user}","branches_url":"https://api.github.com/repos/macropin/django-registration/branches{/branch}","tags_url":"https://api.github.com/repos/macropin/django-registration/tags","blobs_url":"https://api.github.com/repos/macropin/django-registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macropin/django-registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macropin/django-registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/macropin/django-registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macropin/django-registration/statuses/{sha}","languages_url":"https://api.github.com/repos/macropin/django-registration/languages","stargazers_url":"https://api.github.com/repos/macropin/django-registration/stargazers","contributors_url":"https://api.github.com/repos/macropin/django-registration/contributors","subscribers_url":"https://api.github.com/repos/macropin/django-registration/subscribers","subscription_url":"https://api.github.com/repos/macropin/django-registration/subscription","commits_url":"https://api.github.com/repos/macropin/django-registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/macropin/django-registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/macropin/django-registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/macropin/django-registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/macropin/django-registration/contents/{+path}","compare_url":"https://api.github.com/repos/macropin/django-registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macropin/django-registration/merges","archive_url":"https://api.github.com/repos/macropin/django-registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macropin/django-registration/downloads","issues_url":"https://api.github.com/repos/macropin/django-registration/issues{/number}","pulls_url":"https://api.github.com/repos/macropin/django-registration/pulls{/number}","milestones_url":"https://api.github.com/repos/macropin/django-registration/milestones{/number}","notifications_url":"https://api.github.com/repos/macropin/django-registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macropin/django-registration/labels{/name}","releases_url":"https://api.github.com/repos/macropin/django-registration/releases{/id}","deployments_url":"https://api.github.com/repos/macropin/django-registration/deployments","created_at":"2014-04-26T04:04:06Z","updated_at":"2016-07-15T02:38:35Z","pushed_at":"2016-07-15T09:40:53Z","git_url":"git://github.com/macropin/django-registration.git","ssh_url":"git@github.com:macropin/django-registration.git","clone_url":"https://github.com/macropin/django-registration.git","svn_url":"https://github.com/macropin/django-registration","homepage":"http://django-registration-redux.readthedocs.org","size":1656,"stargazers_count":457,"watchers_count":457,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"open_issues_count":18,"forks":213,"open_issues":18,"watchers":457,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/184"},"html":{"href":"https://github.com/macropin/django-registration/pull/184"},"issue":{"href":"https://api.github.com/repos/macropin/django-registration/issues/184"},"comments":{"href":"https://api.github.com/repos/macropin/django-registration/issues/184/comments"},"review_comments":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/184/comments"},"review_comment":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/macropin/django-registration/pulls/184/commits"},"statuses":{"href":"https://api.github.com/repos/macropin/django-registration/statuses/a53405d8c295f98b6d51543b416f5c4f4e66b967"}}}}
{"actor":{"display_login":"joshblum"}}