From 2343f7ab5c738b5b28554c766e78eb6a663bd064 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Tue, 23 Aug 2022 13:11:35 +0400 Subject: Rename Tag Model Author Field Renames the tag model `author` field to `authors` to better indicate what's contained in the field, and updates the documentation. Signed-off-by: Hassan Abouelela --- pydis_site/apps/content/tests/test_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pydis_site/apps/content/tests') diff --git a/pydis_site/apps/content/tests/test_utils.py b/pydis_site/apps/content/tests/test_utils.py index 2ef033e4..462818b5 100644 --- a/pydis_site/apps/content/tests/test_utils.py +++ b/pydis_site/apps/content/tests/test_utils.py @@ -23,7 +23,7 @@ TEST_COMMIT_KWARGS = { "sha": "123", "message": "Hello world\n\nThis is a commit message", "date": _time, - "author": json.dumps([ + "authors": json.dumps([ {"name": "Author 1", "email": "mail1@example.com", "date": _time_str}, {"name": "Author 2", "email": "mail2@example.com", "date": _time_str}, ]), @@ -314,7 +314,7 @@ class TagUtilsTests(TestCase): """Test the get commit function with a normal tag.""" tag = models.Tag.objects.create(name="example") - authors = json.loads(self.commit.author) + authors = json.loads(self.commit.authors) get_mock.return_value = httpx.Response( request=httpx.Request("GET", "https://google.com"), @@ -343,9 +343,9 @@ class TagUtilsTests(TestCase): """Test the get commit function with a group tag.""" tag = models.Tag.objects.create(name="example", group="group-name") - authors = json.loads(self.commit.author) + authors = json.loads(self.commit.authors) authors.pop() - self.commit.author = json.dumps(authors) + self.commit.authors = json.dumps(authors) self.commit.save() get_mock.return_value = httpx.Response( -- cgit v1.2.3