'Confirms that:
(1) A short number of messages whose data size doesn\'t exceed what is
allowed in a cookie will all be stored in the CookieBackend.
(2) If the CookieBackend can store all messages, the SessionBackend
won\'t be written to at all.'

def test_no_fallback(self):

    storage = self.get_storage()
    response = self.get_response()
    self.get_session_storage(storage)._store = None
    for i in range(5):
        storage.add(constants.INFO, (str(i) * 100))
    storage.update(response)
    cookie_storing = self.stored_cookie_messages_count(storage, response)
    self.assertEqual(cookie_storing, 5)
    session_storing = self.stored_session_messages_count(storage, response)
    self.assertEqual(session_storing, 0)
