'Verify that users have the correct access to preview themes.'

def test_preview_theme_access(self):

    response = self.client.get(THEMING_ADMIN_URL)
    self.assertRedirects(response, '{login_url}?next={url}'.format(login_url=settings.LOGIN_REDIRECT_URL, url=THEMING_ADMIN_URL))
    self.client.login(username=self.user.username, password=TEST_PASSWORD)
    response = self.client.get(THEMING_ADMIN_URL)
    self.assertEqual(response.status_code, 404)
    global_staff = GlobalStaffFactory()
    self.client.login(username=global_staff.username, password=TEST_PASSWORD)
    response = self.client.get(THEMING_ADMIN_URL)
    self.assertEqual(response.status_code, 200)
