File tree 4 files changed +30
-5
lines changed
4 files changed +30
-5
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -50,3 +50,12 @@ exclude_lines =
50
50
def __str__
51
51
def __unicode__
52
52
def __repr__
53
+
54
+ [tool:pytest]
55
+ DJANGO_SETTINGS_MODULE =example.settings.test
56
+ filterwarnings =
57
+ error::DeprecationWarning
58
+ error::PendingDeprecationWarning
59
+ testpaths =
60
+ example
61
+ tests
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+
4
+ @pytest .fixture (autouse = True )
5
+ def use_rest_framework_json_api_defaults (settings ):
6
+ """
7
+ Enfroce default settings for tests modules.
8
+
9
+
10
+ As for now example and tests modules share the same settings file
11
+ some defaults which have been overwritten in the example app need
12
+ to be overwritten. This way testing actually happens on default resp.
13
+ each test defines what non default setting it wants to test.
14
+
15
+ Once migration to tests module is finished and tests can have
16
+ its own settings file, this fixture can be removed.
17
+ """
18
+
19
+ settings .JSON_API_FORMAT_FIELD_NAMES = False
20
+ settings .JSON_API_FORMAT_TYPES = False
21
+ settings .JSON_API_PLURALIZE_TYPES = False
You can’t perform that action at this time.
0 commit comments