Artem Muterko
e9d371f29a
Add couple of basic tests for SimpleRateThrottle ( #4800 )
2017-01-09 20:43:54 +00:00
Artem Muterko
b6b2c4bb5b
Renderer tests ( #4791 )
2017-01-08 16:33:43 +00:00
Artem Muterko
99d57df990
Convert encoders tests to pytest style ( #4796 )
2017-01-08 16:10:47 +00:00
Artem Muterko
a5fcf10c0e
Raise RuntimeError when trying to encode coreapi objects ( #4790 )
2017-01-06 22:32:13 +00:00
José Padilla
559a0a89fc
Merge pull request #4779 from auvipy/pyts0
...
converted throttling tests asserts to pytest
2017-01-04 10:31:44 -05:00
Asif Saifuddin Auvi
88a910ebc8
converted negotiation tests asserts to pytest
2017-01-04 18:58:01 +06:00
Asif Saifuddin Auvi
6ca7f76c67
Merge branch 'master' into pyts0
2017-01-04 18:43:55 +06:00
Asif Saifuddin Auvi
43677b8baf
flake8 fix
2017-01-04 17:54:14 +06:00
Asif Saifuddin Auvi
8fa5846e51
conerted multi-table-inheritence test asserts to pytest
2017-01-04 17:46:55 +06:00
Asif Saifuddin Auvi
a7d33f4519
conerted throttling tests asserts to pytest
2017-01-04 15:59:21 +06:00
Asif Saifuddin Auvi
7874bcabe9
convert some more test asserts to pytest ( #4778 )
...
* converted urlpatterns test asserts to pytest
* converted test utils asserts to pytest
* removed extra newlines
2017-01-04 09:13:32 +00:00
Ryan P Kilby
11fd3bf108
Add disabling of declared fields on serializer subclasses ( #4764 )
...
* Add test for disabling declared fields on child
* Check that declared base field is not in attrs
* Update meta inheritance docs to include serializer
* Test that meta fields cannot be declared as None
* Add docs example for declarative field disabling
2017-01-03 21:14:19 +00:00
Matthew Medal
93fe531dea
Breadcrumb view name suffix fix ( #4750 )
...
* add failing testcase for breadcrumb suffixes missing when using ModelViewSets
* fix get_breadcrumbs to honor overridden get_view_name and keep viewset suffixes
* ensure suffixes are appended in breadcrumb util
2016-12-20 22:19:00 +00:00
Asif Saifuddin Auvi
841a91e950
fix authentication_test pytest failure
2016-12-06 00:47:58 +06:00
Asif Saifuddin Auvi
85807e1958
converted authentication_test asserts to pytest
2016-12-06 00:33:13 +06:00
Asif Saifuddin Auvi
932d04a4be
Browsable API tests asserts to pytest ( #4725 )
2016-12-01 16:17:36 +00:00
Asif Saifuddin Auvi
4f6c326a99
converted remaining unittes asserts of fields test to pytest ( #4724 )
2016-11-30 12:52:32 +00:00
Asif Saifuddin Auvi
1a741bb2a2
converted asserts of exceptions test to pytest ( #4723 )
2016-11-30 11:12:01 +00:00
Asif Saifuddin Auvi
7e8b01dbd2
converted asserts of encoders test to pytest
2016-11-30 16:45:48 +06:00
Asif Saifuddin Auvi
9a3f8d9a9c
converted asserts of descriptions test to pytest
2016-11-30 16:42:43 +06:00
Asif Saifuddin Auvi
a9b6c97485
converted asserts of decorators test to pytest
2016-11-30 16:24:48 +06:00
Asif Saifuddin Auvi
504f4b44c6
converted asserts of atomic requests test to pytest
2016-11-30 16:17:30 +06:00
Asif Saifuddin Auvi
e03d88ced7
more pytest style assert ( #4719 )
2016-11-30 09:48:33 +00:00
Asif Saifuddin Auvi
10b5f36fec
added fixes
2016-11-30 12:35:34 +06:00
Asif Saifuddin Auvi
f5a900a404
some reverts to fix test
2016-11-30 10:01:37 +06:00
Asif Saifuddin Auvi
a5bb9825f3
attempt to fix test again
2016-11-30 09:56:22 +06:00
Asif Saifuddin Auvi
4a0829d6ec
attempt to fix test
2016-11-30 02:08:37 +06:00
Asif Saifuddin Auvi
27641e07b5
converted test asserts of generics-test to pytest
2016-11-30 01:13:21 +06:00
Ryan P Kilby
6498766749
Fix django deprecation warnings ( #4712 )
2016-11-29 09:49:18 +00:00
Asif Saifuddin Auvi
9f4c9691f4
converted filters tests asserts to pytest style ( #4711 )
2016-11-28 14:31:27 +00:00
Asif Saifuddin Auvi
42d6098c74
converted primary key relations test asserts to pytest ( #4709 )
2016-11-28 09:43:48 +00:00
Asif Saifuddin Auvi
cd3fd36d0e
converted generic relations assert to pytest style
2016-11-27 23:55:09 +06:00
Asif Saifuddin Auvi
5ec223bca0
converted validators and write_only_fields test to pytest style ( #4697 )
2016-11-23 14:05:34 +00:00
Asif Saifuddin Auvi
4b59ec27fa
convert tests asserts to pytest style ( #4696 )
2016-11-23 13:17:00 +00:00
Tom Christie
24791cb353
Invalidate any existing prefetch cache on PUT requests. ( #4668 )
2016-11-11 09:44:35 +00:00
Andrzej Pragacz
45e058d7ba
Fix unhandled Http404, PermissionDenied in schema generation ( #4645 ) ( #4646 )
2016-11-02 09:04:01 +00:00
Kennedy Mwenja
7038571157
Enable cursor pagination of value querysets. ( #4569 )
...
To do `GROUP_BY` queries in django requires one to use `.values()`
eg this groups posts by user getting a count of posts per user.
```
Posts.objects.order_by('user').values('user').annotate(post_count=Count('post'))
```
This would produce a value queryset which serializes its result
objects as dictionaries while `CursorPagination` requires a queryset
with result objects that are model instances.
This commit enables cursor pagination for value querysets.
- had to mangle the tests a bit to test it out. They might need
some refactoring.
- tried the same for `.values_list()` but it turned out to be
trickier than I expected since you have to use tuple indexes.
2016-11-01 10:42:01 +00:00
Nicolas Delaby
97d848413e
Fix support of get_full_details() for Throttled exceptions ( #4627 )
...
Since `str` objects are immutable, appending to existing `str` creates
in fact a new `str` instance.
Thus `ErrorDetail.detail.code` attribute is lost after `str` concatenation operation.
2016-11-01 10:38:56 +00:00
Kieran Spear
98df932194
Fix FilterSet proxy ( #4620 )
2016-11-01 10:30:17 +00:00
Ryan P Kilby
d92b24a0b7
Make serializer fields import explicit ( #4628 )
2016-11-01 10:27:11 +00:00
Alex Kahan
895c67c9a2
Fixes #4532 ( #4636 )
2016-10-31 20:41:54 +00:00
Ryan P Kilby
eafc9a2393
Fix is_simple_callable with variable args, kwargs ( #4622 )
2016-10-25 20:47:24 +01:00
Tom Christie
0fe0e1e703
Fix schema base paths ( #4611 )
2016-10-21 16:59:34 +01:00
Tom Christie
f1bdce17b5
Fix for case of ListSerializer with single item ( #4609 )
2016-10-21 15:21:23 +01:00
Tom Christie
2395fb5386
Deprecate DjangoFilter backend ( #4593 )
...
Deprecate the built-in `rest_framework.filters.DjangoFilterBackend` in favour of the third-party `django_filters.rest_framework.DjangoFilterBackend`.
2016-10-20 10:47:09 +01:00
Tom Christie
de08f28a91
Test one to one with inheritance ( #4575 )
2016-10-13 14:21:23 +01:00
Tom Christie
8d0a91b002
Fix 3674 ( #4571 )
...
Handle ModelSerializer case for relationships to models with custom pk.
2016-10-13 12:43:43 +01:00
Alexey Evseev
2519ce9128
Fix schema generation with custom page_size pagination param ( #4567 )
2016-10-12 16:09:45 +01:00
Tom Christie
5677d063d8
Do not treat empty non-form input as HTML. ( #4566 )
2016-10-12 15:46:24 +01:00
Tom Christie
26e51ecd6c
When HTML form input is used with JSONField, treat the input as a JSON encoded string, not a JSON primative. ( #4565 )
2016-10-12 14:04:10 +01:00