def test_adding_more_than_threshold_raises(self):
        dummy_product = create_product(price=D('10.00'), num_in_stock=10)
        url = reverse('basket:add', kwargs={'pk': dummy_product.pk})
        post_params = {'product_id': dummy_product.id,
                       'action': 'add',
                       'quantity': 2}
        response = self.client.post(url, post_params)
        self.assertTrue('oscar_open_basket' in response.cookies)
        post_params = {'product_id': dummy_product.id,
                       'action': 'add',
                       'quantity': 2}
        response = self.client.post(url, post_params)

        expected = ugettext(
            "Due to technical limitations we are not able to ship more "
            "than %(threshold)d items in one order. Your basket currently "
            "has %(basket)d items."
        ) % ({'threshold': 3, 'basket': 2})
        self.assertTrue(expected in response.cookies['messages'].value)
dataset/ETHPy150Open django-oscar/django-oscar/tests/functional/basket_tests.py/BasketThresholdTest.test_adding_more_than_threshold_raises/original