def test_max_cookie_length(self):
        storage = self.get_storage()
        response = self.get_response()

        # When storing as a cookie, the cookie has constant overhead of approx
        # 54 chars, and each message has a constant overhead of about 37 chars
        # and a variable overhead of zero in the best case. We aim for a message
        # size which will fit 4 messages into the cookie, but not 5.
        # See also FallbackTest.test_session_fallback
        msg_size = int((CookieStorage.max_cookie_size - 54) / 4.5 - 37)
        for i in range(5):
            storage.add(constants.INFO, str(i) * msg_size)
        unstored_messages = storage.update(response)

        cookie_storing = self.stored_messages_count(storage, response)
        self.assertEqual(cookie_storing, 4)

        self.assertEqual(len(unstored_messages), 1)
        self.assertTrue(unstored_messages[0].message == '0' * msg_size)
Tags by applying each rule to the entire corpus (rather than all rules to a
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/messages/tests/cookie.py/CookieTest.test_max_cookie_length--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/tag/brill.py/BrillTagger.batch_tag_incremental