def test_desktop_home(self) -> None:
    email = self.example_email('hamlet')
    self.login(email)
    result = self.client_get('/desktop_home')
    self.assertEqual(result.status_code, 301)
    self.assertTrue(result['Location'].endswith('/desktop_home/'))
    result = self.client_get('/desktop_home/')
    self.assertEqual(result.status_code, 302)
    path = urllib.parse.urlparse(result['Location']).path
    self.assertEqual(path, '/')
def test_desktop_home(self) -> None:
    email = self.example_email('hamlet')
    self.login(email)
    result = self.client_get('/desktop_home')
    self.assertEqual(result.status_code, 301)
    self.assertTrue(result['Location'].endswith('/desktop_home/'))
    result = self.client_get('/desktop_home/')
    self.assertEqual(result.status_code, 302)
    path = urllib.parse.urlparse(result['Location']).path
    self.assertEqual(path, '/')