diff options
author | 2022-08-23 13:11:35 +0400 | |
---|---|---|
committer | 2022-08-23 13:11:35 +0400 | |
commit | 2343f7ab5c738b5b28554c766e78eb6a663bd064 (patch) | |
tree | 924264f61a5fa7a8b569eef69e398e91de958b18 /pydis_site/apps/content/tests | |
parent | Support Hyperlinked Tag Group Replacement (diff) |
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 <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/tests')
-rw-r--r-- | pydis_site/apps/content/tests/test_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
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": "[email protected]", "date": _time_str}, {"name": "Author 2", "email": "[email protected]", "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( |