diff options
| author | 2021-12-16 22:29:11 +0000 | |
|---|---|---|
| committer | 2021-12-16 22:29:11 +0000 | |
| commit | 59e4a5c8316464e116630a329064decac4c2a075 (patch) | |
| tree | 2cd805a4c69018dff65329bb195376699c60a4aa /pydis_site/apps/api/tests | |
| parent | Merge pull request #635 from python-discord/revert-metricity-change (diff) | |
Always include metricity message blocks
Thanks to a recent database maintenance (https://pythondiscord.freshstatus.io/incident/139811) querying out metricity message data is far cheaper. So there is no longer a reason to only fetch blocks if the member has a low message count.
Diffstat (limited to 'pydis_site/apps/api/tests')
| -rw-r--r-- | pydis_site/apps/api/tests/test_users.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py index 81bfd43b..9b91380b 100644 --- a/pydis_site/apps/api/tests/test_users.py +++ b/pydis_site/apps/api/tests/test_users.py @@ -408,7 +408,7 @@ class UserMetricityTests(AuthenticatedAPITestCase): in_guild=True, ) - def test_get_metricity_data_under_1k(self): + def test_get_metricity_data(self): # Given joined_at = "foo" total_messages = 1 @@ -428,25 +428,6 @@ class UserMetricityTests(AuthenticatedAPITestCase): "activity_blocks": total_blocks }) - def test_get_metricity_data_over_1k(self): - # Given - joined_at = "foo" - total_messages = 1001 - total_blocks = 1001 - self.mock_metricity_user(joined_at, total_messages, total_blocks, []) - - # When - url = reverse('api:bot:user-metricity-data', args=[0]) - response = self.client.get(url) - - # Then - self.assertEqual(response.status_code, 200) - self.assertCountEqual(response.json(), { - "joined_at": joined_at, - "total_messages": total_messages, - "voice_banned": False, - }) - def test_no_metricity_user(self): # Given self.mock_no_metricity_user() |