Repository: readthedocs/readthedocs.org

Issue:
Bump allauth to next release
When the next version of allauth is released, be sure to bump allauth in requirements.



Discussion:

Resolving patch:
diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py
--- a/readthedocs/projects/models.py
+++ b/readthedocs/projects/models.py
@@ -339,11 +339,11 @@ def save(self, *args, **kwargs):  # pylint: disable=arguments-differ
                     'Re-symlinking superprojects: project=%s',
                     self.slug,
                 )
-                for superproject in self.superprojects.all():
+                for relationship in self.superprojects.all():
                     broadcast(
                         type='app',
                         task=tasks.symlink_project,
-                        args=[superproject.pk],
+                        args=[relationship.parent.pk],
                     )
 
         except Exception:


Test patch:
diff --git a/readthedocs/rtd_tests/tests/test_api.py b/readthedocs/rtd_tests/tests/test_api.py
--- a/readthedocs/rtd_tests/tests/test_api.py
+++ b/readthedocs/rtd_tests/tests/test_api.py
@@ -466,6 +466,7 @@ def test_bitbucket_webhook(self, trigger_build):
         trigger_build.assert_has_calls(
             [mock.call(force=True, version=mock.ANY, project=self.project)])
 
+        trigger_build_call_count = trigger_build.call_count
         client.post(
             '/api/v2/webhook/bitbucket/{0}/'.format(self.project.slug),
             {
@@ -479,8 +480,7 @@ def test_bitbucket_webhook(self, trigger_build):
             },
             format='json',
         )
-        trigger_build.assert_not_called(
-            [mock.call(force=True, version=mock.ANY, project=self.project)])
+        self.assertEqual(trigger_build_call_count, trigger_build.call_count)
 
     def test_bitbucket_invalid_webhook(self, trigger_build):
         """Bitbucket webhook unhandled event."""
diff --git a/readthedocs/rtd_tests/tests/test_project_symlinks.py b/readthedocs/rtd_tests/tests/test_project_symlinks.py
--- a/readthedocs/rtd_tests/tests/test_project_symlinks.py
+++ b/readthedocs/rtd_tests/tests/test_project_symlinks.py
@@ -926,7 +926,7 @@ def test_symlink_broadcast_calls_on_project_save(self):
             project.description = 'New description'
             project.save()
             # called once for this project itself
-            broadcast.assert_any_calls(
+            broadcast.assert_any_call(
                 type='app',
                 task=symlink_project,
                 args=[project.pk],
@@ -944,13 +944,13 @@ def test_symlink_broadcast_calls_on_project_save(self):
             subproject.description = 'New subproject description'
             subproject.save()
             # subproject symlinks
-            broadcast.assert_any_calls(
+            broadcast.assert_any_call(
                 type='app',
                 task=symlink_project,
                 args=[subproject.pk],
             )
             # superproject symlinks
-            broadcast.assert_any_calls(
+            broadcast.assert_any_call(
                 type='app',
                 task=symlink_project,
                 args=[project.pk],