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

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

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_views.py   django-daguerre(Download)
        }
        user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(user.has_perm('daguerre.change_area'))
        for key in params:
            params_copy = params.copy()
                                    HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        request.user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        # SB: Used to assert 4 - don't remember why.
        # Three queries expected: get the area, update the area,
                                    HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        request.user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        with self.assertNumQueries(1):
            response = view.post(request)
        request.user = self.create_user(permissions=['daguerre.change_area',
                                                     'daguerre.add_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        self.assertTrue(request.user.has_perm('daguerre.add_area'))
        with self.assertNumQueries(3):

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_views.py   django-daguerre(Download)
        }
        user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(user.has_perm('daguerre.change_area'))
        for key in params:
            params_copy = params.copy()
                                    HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        request.user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        # SB: Used to assert 4 - don't remember why.
        # Three queries expected: get the area, update the area,
                                    HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        request.user = self.create_user(permissions=['daguerre.change_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        with self.assertNumQueries(1):
            response = view.post(request)
        request.user = self.create_user(permissions=['daguerre.change_area',
                                                     'daguerre.add_area'])
        self.assertTrue(request.user.has_perm('daguerre.change_area'))
        self.assertTrue(request.user.has_perm('daguerre.add_area'))
        with self.assertNumQueries(3):

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_adjustments.py   django-daguerre(Download)
        self.assertImageEqual(Image.open(adjusted.adjusted.path), expected)
        # Make sure that the path is properly formatted.
        self.assertTrue(adjusted.adjusted.path.endswith('.png'))
 
    def test_adjust_crop__100x50(self):

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_adjustments.py   django-daguerre(Download)
        self.assertImageEqual(Image.open(adjusted.adjusted.path), expected)
        # Make sure that the path is properly formatted.
        self.assertTrue(adjusted.adjusted.path.endswith('.png'))
 
    def test_adjust_crop__100x50(self):

src/d/j/django-daguerre-2.1.1/daguerre/tests/unit/test_management.py   django-daguerre(Download)
        duplicates = clean._duplicate_adjustments()
        self.assertNotIn(adjusted3, duplicates)
        self.assertTrue(list(duplicates) == [adjusted1] or
                        list(duplicates) == [adjusted2])
 
            helpers = preadjust._get_helpers()
        self.assertEqual(len(helpers), 1)
        self.assertTrue(qs._result_cache is None)
 
    def test_get_helpers__iterable(self):

src/d/j/django-daguerre-HEAD/daguerre/tests/unit/test_management.py   django-daguerre(Download)
        duplicates = clean._duplicate_adjustments()
        self.assertNotIn(adjusted3, duplicates)
        self.assertTrue(list(duplicates) == [adjusted1] or
                        list(duplicates) == [adjusted2])
 
            helpers = preadjust._get_helpers()
        self.assertEqual(len(helpers), 1)
        self.assertTrue(qs._result_cache is None)
 
    def test_get_helpers__iterable(self):