def test_episode_details_with_translated_episode_name(self): with add_new_language(): episode_id = 1 url = reverse("episode-detail", kwargs={"pk": episode_id}) response = self.client.get(url, **{"HTTP_ACCEPT_LANGUAGE": "foo-br"}) assert_that(response, has_status_code(status.HTTP_200_OK)) assert_that(response.data["name"], equal_to("crwdns4197:0crwdne4197:0"))
def test_list_episodes_with_translated_episode_names(self): with add_new_language(): url = reverse('levels') response = self.client.get(url, **{'HTTP_ACCEPT_LANGUAGE': 'foo-br'}) assert_that(response.status_code, equal_to(200)) self._assert_that_response_contains_episode_name(response, 'crwdns4197:0crwdne4197:0') self._assert_that_response_contains_level_with_title(response, 'crwdns3456:0crwdne3456:0')
def test_list_episodes_with_translated_episode_names(self): with add_new_language(): url = reverse('episode-list') response = self.client.get(url, **{'HTTP_ACCEPT_LANGUAGE': 'foo-br'}) assert_that(response, has_status_code(status.HTTP_200_OK)) assert_that(response.data[0]['name'], equal_to('crwdns4197:0crwdne4197:0'))
def test_episode_details_with_translated_episode_name(self): with add_new_language(): episode_id = 1 url = reverse('episode-detail', kwargs={'pk': episode_id}) response = self.client.get(url, **{'HTTP_ACCEPT_LANGUAGE': 'foo-br'}) assert_that(response, has_status_code(status.HTTP_200_OK)) assert_that(response.data['name'], equal_to('crwdns4197:0crwdne4197:0'))
def test_list_episodes_with_translated_episode_names(self): with add_new_language(): url = reverse("episode-list") superuser = get_superuser() self.client.force_authenticate(user=superuser) response = self.client.get(url, **{"HTTP_ACCEPT_LANGUAGE": "foo-br"}) assert_that(response, has_status_code(status.HTTP_200_OK)) assert_that(response.data[0]["name"], equal_to("crwdns4197:0crwdne4197:0"))
def test_list_episodes_with_translated_episode_names(self): with add_new_language(): url = reverse("levels") response = self.client.get(url, **{"HTTP_ACCEPT_LANGUAGE": "foo-br"}) assert_that(response.status_code, equal_to(200)) self._assert_that_response_contains_episode_name( response, "crwdns4197:0crwdne4197:0" ) self._assert_that_response_contains_level_with_title( response, "crwdns3456:0crwdne3456:0" )
def test_list_episodes_with_translated_episode_names(self): with add_new_language(): url = reverse("episode-list") response = self.client.get(url, **{"HTTP_ACCEPT_LANGUAGE": "foo-br"}) assert_that(response, has_status_code(status.HTTP_200_OK)) assert_that(response.data[0]["name"], equal_to("crwdns4197:0crwdne4197:0"))