django-mock-queries icon indicating copy to clipboard operation
django-mock-queries copied to clipboard

A library for mocking django queryset functions in memory for testing

Results 25 django-mock-queries issues
Sort by recently updated
recently updated
newest added

All I did was fix the flake8 errors in https://github.com/stphivos/django-mock-queries/pull/135

Python 2.7 and 3.5 are no longer supported, as are Django 2.0, 2.1 and 3.0. DRF before 3.9 is pretty old, so I dropped support for that as well. This...

New methods implemented: `annotate`and `in_bulk`

The behavior for the QuerySets delete in Django is to return a tuple with the number of entries deleted, and a dictionary with how many entries were deleted for each...

I used this library in several scenarios and it worked flawlessly. However I discovered that the `union` method of the `QuerySet` is not explicitly implemented. That causes `union` to be...

enhancement

The deprecated aliases have been removed in python/cpython#28268

Hi, is there some example with mocked_relations and the models.Manager (objects=MiManager) because it doesnt reconized the function from the manger assigned (Mock object has no attribute ..) , thanks and...

Suppose we have two models: Patient and Slot. ``` class Slot(Model): ... email = EmailField(...) patient = models.ForeignKey( 'patients.Patient', related_name='slots', related_query_name='slot', ... ) ``` And then we need to filter...

bug

I'm trying to mock out and test a m2m field get set in my test. I'm also using model_bakery for fixtures The code I want to test is: `provider_currency.supported_countries.set(supported_countries)` And...

When trying to create a mock model that has some PKs, it fails with: `ValueError: Cannot assign "mock-pizza-1": "MyModel.pizzas" must be a "Pizza" instance` Could have something to do with...