Did I find the right examples for you? yes no

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

src/d/j/django-swingers-1.1.1/swingers/utils/tests.py   django-swingers(Download)
    def test_filter_queryset(self):
        duck = Duck.objects.create(name='Tomas')
        queryset = Duck.objects.all()
        q = filter_queryset('Tomas', Duck, queryset)
        self.assertQuerysetEqual(q, list(queryset.values_list('pk',
        self.assertEqual(field, 'poly')
 
        Duck.objects.create(name='Tomas')
        self.assertRaises(ValueError, find_geom_field, Duck.objects.all())
 

src/d/j/django-swingers-1.1.1/swingers/middleware/tests.py   django-swingers(Download)
        transaction.enter_transaction_management()
        transaction.managed(True)
        duck = Duck.objects.create(name='test')
        ResponseStatusTransactionMiddleware().process_response(self.request,
                                                               self.response)
            transaction.enter_transaction_management()
            transaction.managed(True)
            Duck.objects.create(name='test')
            self.response.status_code = status_code
            middleware.process_response(self.request, self.response)
        transaction.enter_transaction_management()
        transaction.managed(False)
        Duck.objects.create(name='test')
        ResponseStatusTransactionMiddleware().process_response(self.request,
                                                               self.response)

src/d/j/django-swingers-1.1.1/swingers/sauth/tests.py   django-swingers(Download)
        results in a default user (pk=1) assigned to creation/modification.
        """
        daffy = Duck.objects.create(name='daffy')
        user = User.objects.get(pk=1)
        self.assertEqual(daffy.creator.username, user.username)

src/d/j/django-swingers-1.1.1/swingers/admin/tests.py   django-swingers(Download)
    def test_RelatedFieldAdmin(self):
        duck = Duck.objects.create(name='duck')
        parent_duck = ParentDuck.objects.create(name='parent_duck', duck=duck)
        grand_parent_duck = GrandParentDuck.objects.create(
            name='grand_parent_duck', duck=parent_duck)