Make v2 design live
Commit 39a4f pushed by Anže Pečar

15 tests 7 passed 8 failed Duration
self = <accounts.tests.TestSelectedInstance testMethod=test_invalid_selected_instance>

    def test_invalid_selected_instance(self):
        response = self.client.get("/?selected_instance=invalid")
        self.assertEqual(response.status_code, 200)
        self.assertIsNone(response.context["selected_instance"])
        self.assertIsNone(self.client.session.get("selected_instance"))
>       self.assertContains(
            response,
            "Select your Mastodon instance",
        )

accounts/tests.py:179: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'Select your Mastodon instance' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_no_selected_instance>

    def test_no_selected_instance(self):
        response = self.client.get("/")
        self.assertEqual(response.status_code, 200)
        self.assertIsNone(response.context["selected_instance"])
        self.assertIsNone(self.client.session.get("selected_instance"))
>       self.assertContains(
            response,
            "Select your Mastodon instance",
        )

accounts/tests.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'Select your Mastodon instance' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance>

    def test_selected_instance(self):
        response = self.client.get("/?selected_instance=mastodon.social")
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context["selected_instance"], "mastodon.social")
        self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
>       self.assertContains(
            response,
            "mastodon.social selected",
        )

accounts/tests.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'mastodon.social selected' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_https_truncate>

    def test_selected_instance_https_truncate(self):
        response = self.client.get("/?selected_instance=https://mastodon.social")
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context["selected_instance"], "mastodon.social")
        self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
>       self.assertContains(
            response,
            "mastodon.social selected",
        )

accounts/tests.py:125: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'mastodon.social selected' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_http_truncate>

    def test_selected_instance_http_truncate(self):
        response = self.client.get("/?selected_instance=https://mastodon.social")
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context["selected_instance"], "mastodon.social")
        self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
>       self.assertContains(
            response,
            "mastodon.social selected",
        )

accounts/tests.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'mastodon.social selected' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_slash_truncate>

    def test_selected_instance_slash_truncate(self):
        response = self.client.get("/?selected_instance=https://mastodon.social/")
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context["selected_instance"], "mastodon.social")
        self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
>       self.assertContains(
            response,
            "mastodon.social selected",
        )

accounts/tests.py:161: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'mastodon.social selected' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_through_session>

    def test_selected_instance_through_session(self):
        self.client.get("/?selected_instance=mastodon.social")
        response = self.client.get("/")
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.context["selected_instance"], "mastodon.social")
        self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
>       self.assertContains(
            response,
            "mastodon.social selected",
        )

accounts/tests.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'mastodon.social selected' in response
self = <accounts.tests.TestSelectedInstance testMethod=test_unselected_instance>

    def test_unselected_instance(self):
        self.client.get("/?selected_instance=mastodon.social")
        response = self.client.get("/?selected_instance=")
        self.assertEqual(response.status_code, 200)
        self.assertIsNone(response.context["selected_instance"])
        self.assertIsNone(self.client.session.get("selected_instance"))
>       self.assertContains(
            response,
            "Select your Mastodon instance",
        )

accounts/tests.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/django/test/testcases.py:537: in assertContains
    self.assertTrue(
E   AssertionError: False is not true : Couldn't find 'Select your Mastodon instance' in response