From: Fam Zheng <fam@euphon.net>
This is going to be required in newer Django.
---
tests/patchewtest.py | 2 +-
tests/test_rest.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/patchewtest.py b/tests/patchewtest.py
index b8b795a..d0bb568 100644
--- a/tests/patchewtest.py
+++ b/tests/patchewtest.py
@@ -65,7 +65,7 @@ class PatchewTestCase(dj_test.LiveServerTestCase):
username or self.user, self.email, password or self.password
)
if groups:
- user.groups = [Group.objects.get_or_create(name=g)[0] for g in groups]
+ user.groups.set([Group.objects.get_or_create(name=g)[0] for g in groups])
user.save()
return user
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 5baf2ab..e82d8fa 100755
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -638,7 +638,7 @@ class RestTest(PatchewTestCase):
def test_maintainer_create_message(self):
test = self.create_user(username="test", password="userpass")
self.api_client.login(username="test", password="userpass")
- self.p.maintainers = (test,)
+ self.p.maintainers.set([test])
dp = self.get_data_path("0023-multiple-project-patch.mbox.gz")
with open(dp, "r") as f:
data = f.read()
--
2.25.1
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel