Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

src/d/j/django-oscar-HEAD/tests/functional/dashboard/user_tests.py   django-oscar(Download)
        ex_inactive = User.objects.get(id=self.inactive_users_ids[10])
        self.assertIsRedirect(response)
        self.assertTrue(ex_inactive.is_active)
 
    def test_make_inactive(self):

src/d/j/django-oscar-HEAD/tests/functional/customer/profile_tests.py   django-oscar(Download)
    def test_can_view_their_profile(self):
        response = self.app.get(reverse('customer:profile-view'),
                                user=self.user)
        self.assertEqual(200, response.status_code)
        self.assertTrue(self.email in response.content.decode('utf8'))
        self.assertRedirects(response, reverse('customer:profile-view'))
        updated_user = User.objects.get(pk=self.user.pk)
        self.assertTrue(updated_user.check_password(new_password))
 
    def test_can_reorder_a_previous_order(self):

src/d/j/django-oscar-HEAD/tests/functional/dashboard/page_tests.py   django-oscar(Download)
    def test_dashboard_index_is_for_staff_only(self):
        response = self.get(reverse('dashboard:page-list'))
        self.assertTrue('Password' not in response.content.decode('utf8'))
 
    def test_dashboard_page_list(self):
        response = self.get(reverse('dashboard:page-list'))
        objects = response.context[-1]['object_list']
 
        self.assertTrue(self.flatpage_1 in objects)
        self.assertTrue(self.flatpage_2 in objects)

src/d/j/django-oscar-HEAD/tests/functional/dashboard/catalogue_tests.py   django-oscar(Download)
            pass
        else:
            self.assertTrue(product.title == new_title)
            if product.has_stockrecords:
                self.fail('Product has stock records but should not')

src/d/j/django-oscar-HEAD/tests/functional/dashboard/order_tests.py   django-oscar(Download)
    def test_order_detail_page_contains_order(self):
        response = self.get(self.url)
        self.assertTrue('order' in response.context)
 
    def test_order_status_change(self):

src/d/j/django-oscar-HEAD/tests/functional/dashboard/offer_tests.py   django-oscar(Download)
 
        reloaded_offer = models.ConditionalOffer.objects.get(pk=offer.pk)
        self.assertTrue(reloaded_offer.is_suspended)
 
    def test_can_reinstate_a_suspended_offer(self):
        # Create a suspended offer
        offer = factories.create_offer()
        offer.suspend()
        self.assertTrue(offer.is_suspended)

src/d/j/django-oscar-HEAD/tests/functional/dashboard/dashboard_tests.py   django-oscar(Download)
        for name in urls:
            response = self.get(reverse(name))
            self.assertTrue('Password' not in response.content.decode('utf8'))
 
    def test_includes_hourly_report_with_no_orders(self):

src/d/j/django-oscar-HEAD/tests/functional/dashboard/review_tests.py   django-oscar(Download)
        response = self.get(url, params={'status': 3})
        reviews = response.context['review_list']
        self.assertTrue(review1 in reviews)
 

src/d/j/django-oscar-HEAD/tests/functional/catalogue/catalogue_tests.py   django-oscar(Download)
        response = self.app.get(wrong_url)
        self.assertEqual(http_client.MOVED_PERMANENTLY, response.status_code)
        self.assertTrue(p.get_absolute_url() in response.location)
 
    def test_variant_to_parent_redirect(self):
        response = self.app.get(wrong_url)
        self.assertEqual(http_client.MOVED_PERMANENTLY, response.status_code)
        self.assertTrue(self.category.get_absolute_url() in response.location)
 
    def test_can_chop_off_last_part_of_url(self):
        parent_url = self.category.get_absolute_url()
        response = self.app.get(chopped_url).follow()  # fails if no redirect
        self.assertTrue(response.url.endswith(parent_url))
 
 

src/d/j/django-oscar-HEAD/tests/functional/dashboard/communication_tests.py   django-oscar(Download)
        form['email_body_html_template'] = 'Hello {{ user.username }}'
        preview = form.submit('show_preview')
        self.assertTrue('Hello 1234' in preview.content.decode('utf8'))
 
    def test_can_send_a_preview_email(self):

  1 | 2  Next