flakytest.dev anze3db fedidevs
Runs / #1141

Failed Run #1141

8 hours ago · 623aa3e on main · Restart the web server on deploy when the Python version changes · Anže Pečar

Sessions

One per pytest invocation
Environment Status Python Changed files
CI github-actions:test TESTS_FAILED 3.14.8 0 Profile
Test Outcome Duration
starter_packs/tests.py::TestShareStarterPack::test_api_plain_json
Failure details
self = <starter_packs.tests.TestShareStarterPack testMethod=test_api_plain_json>

    def test_api_plain_json(self):
        # Testing the plain JSON response
        url = reverse("share_starter_pack", args=[self.starter_pack.slug])
        response = self.client.get(
            url,
            headers={"accept": "application/json"},
        )
    
        payload = response.json()
        accounts = (
            Account.objects.filter(
                starterpackaccount__starter_pack=self.starter_pack,
                instance_model__isnull=False,
                instance_model__deleted_at__isnull=True,
                discoverable=True,
            )
            .select_related("accountlookup", "instance_model")
            .order_by("-followers_count")
        )
>       self.assertEqual(
            payload,
            {
                "url": f"http://testserver{url}",
                "title": self.starter_pack.title,
                "description": self.starter_pack.description,
                "created_by": self.starter_pack.created_by.username,
                "created_at": self.starter_pack.created_at.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z",
                "updated_at": self.starter_pack.updated_at.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z",
                "published_at": self.starter_pack.published_at,
                "daily_follows": self.starter_pack.daily_follows,
                "weekly_follows": self.starter_pack.weekly_follows,
                "monthly_follows": self.starter_pack.monthly_follows,
                "accounts": [
                    {
                        "name": account.name,
                        "handle": account.username_at_instance,
                        "url": account.url,
                        "activitypub_id": account.activitypub_id,
                        "created_at": account.created_at.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z",
                        "followers_count": account.followers_count,
                        "following_count": account.following_count,
                        "statuses_count": account.statuses_count,
                        "bot": account.bot,
                        "discoverable": account.discoverable,
                        "locked": account.locked,
                        "noindex": account.noindex,
                        "avatar": account.avatar,
                        "header": account.avatar,
                    }
                    for account in accounts
                ],
            },
        )
E       AssertionError: {'url[4741 chars]53:44Z', 'followers_count': -2018463948, 'foll[241 chars]/'}]} != {'url[4741 chars]53:44.000Z', 'followers_count': -2018463948, '[245 chars]/'}]}
E       Diff is 6356 characters long. Set self.maxDiff to None to see it.

starter_packs/tests.py:866: AssertionError
Fail 268 ms