<commit_before>from apps.blogs.views import BlogPostList, BlogPostDetail
from apps.bluebottle_utils.tests import BlogPostCreationMixin
from django.test import TestCase
from rest_framework import status


class BlogPostApiIntegrationTest(BlogPostCreationMixin, TestCase):
    """
    Integration tests for the Blogpost API.
    """

    def setUp(self):
        self.blogpost = self.create_blogpost()
        self.list_view = BlogPostList.as_view()
        self.detail_view = BlogPostDetail.as_view()
        self.blogpost_detail_url = "{0}{1}".format('/i18n/api/blogs/', self.blogpost.slug)


    def test_blogpost_retrieve(self):
        """
        Tests for retrieving blogpost.
        """

        # Retrieve reaction.
        response = self.client.get(self.blogpost_detail_url)
        self.assertEqual(response.status_code, status.HTTP_200_OK, response.data)
        self.assertEqual(response.data['title'], self.blogpost.title)
<commit_msg>Fix a spelling mistake in blogs tests.<commit_after>from apps.blogs.views import BlogPostList, BlogPostDetail
from apps.bluebottle_utils.tests import BlogPostCreationMixin
from django.test import TestCase
from rest_framework import status


class BlogPostApiIntegrationTest(BlogPostCreationMixin, TestCase):
    """
    Integration tests for the BlogPost API.
    """

    def setUp(self):
        self.blogpost = self.create_blogpost()
        self.list_view = BlogPostList.as_view()
        self.detail_view = BlogPostDetail.as_view()
        self.blogpost_detail_url = "{0}{1}".format('/i18n/api/blogs/', self.blogpost.slug)


    def test_blogpost_retrieve(self):
        """
        Test retrieving a BlogPost.
        """

        # Retrieve reaction.
        response = self.client.get(self.blogpost_detail_url)
        self.assertEqual(response.status_code, status.HTTP_200_OK, response.data)
        self.assertEqual(response.data['title'], self.blogpost.title)

{'fraction_non_alphanumeric': 0.09947916666666666, 'fraction_numerical': 0.007291666666666667, 'mean_word_length': 3.5093896713615025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2313953', 'n_tokens_mistral': 586, 'n_tokens_neox': 562, 'n_words': 110}