def test_apps_view(self) -> None:
    result = self.client_get('/apps')
    self.assertEqual(result.status_code, 301)
    self.assertTrue(result['Location'].endswith('/apps/'))
    with self.settings(ZILENCER_ENABLED=False):
        result = self.client_get('/apps/')
    self.assertEqual(result.status_code, 301)
    self.assertTrue((result['Location'] == 'https://zulipchat.com/apps/'))
    with self.settings(ZILENCER_ENABLED=True):
        result = self.client_get('/apps/')
    self.assertEqual(result.status_code, 200)
    html = result.content.decode('utf-8')
    self.assertIn('Apps for every platform.', html)
def test_apps_view(self) -> None:
    result = self.client_get('/apps')
    self.assertEqual(result.status_code, 301)
    self.assertTrue(result['Location'].endswith('/apps/'))
    with self.settings(ZILENCER_ENABLED=False):
        result = self.client_get('/apps/')
    self.assertEqual(result.status_code, 301)
    self.assertTrue((result['Location'] == 'https://zulipchat.com/apps/'))
    with self.settings(ZILENCER_ENABLED=True):
        result = self.client_get('/apps/')
    self.assertEqual(result.status_code, 200)
    html = result.content.decode('utf-8')
    self.assertIn('Apps for every platform.', html)