@@ -82,20 +82,11 @@ def test_valid_offset_limit(self):
8282 @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
8383 reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
8484 def test_limit_offset_deprecation (self ):
85- with pytest .warns (PendingDeprecationWarning ) as record :
85+ with pytest .warns (DeprecationWarning ) as record :
8686 pagination .LimitOffsetPagination ()
8787 assert len (record ) == 1
8888 assert 'LimitOffsetPagination will change in release 3.0' in str (record [0 ].message )
8989
90- @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
91- reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
92- def test_jsonapi_limit_offset_deprecation (self ):
93- with pytest .warns (PendingDeprecationWarning ) as record :
94- pagination .JsonApiLimitOffsetPagination ()
95- assert len (record ) == 1
96- assert 'JsonApiLimitOffsetPagination will be renamed to LimitOffsetPagination' \
97- in str (record [0 ].message )
98-
9990 class MyInheritedLimitOffsetPagination (pagination .LimitOffsetPagination ):
10091 """
10192 Inherit the default values
@@ -109,7 +100,7 @@ class MyOverridenLimitOffsetPagination(pagination.LimitOffsetPagination):
109100 max_limit = None
110101
111102 def test_my_limit_offset_deprecation (self ):
112- with pytest .warns (PendingDeprecationWarning ) as record :
103+ with pytest .warns (DeprecationWarning ) as record :
113104 self .MyInheritedLimitOffsetPagination ()
114105 assert len (record ) == 1
115106 assert 'LimitOffsetPagination will change in release 3.0' in str (record [0 ].message )
@@ -127,20 +118,11 @@ class TestPageNumber:
127118 @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
128119 reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
129120 def test_page_number_deprecation (self ):
130- with pytest .warns (PendingDeprecationWarning ) as record :
121+ with pytest .warns (DeprecationWarning ) as record :
131122 pagination .PageNumberPagination ()
132123 assert len (record ) == 1
133124 assert 'PageNumberPagination will change in release 3.0' in str (record [0 ].message )
134125
135- @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
136- reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
137- def test_jsonapi_page_number_deprecation (self ):
138- with pytest .warns (PendingDeprecationWarning ) as record :
139- pagination .JsonApiPageNumberPagination ()
140- assert len (record ) == 1
141- assert 'JsonApiPageNumberPagination will be renamed to PageNumberPagination' \
142- in str (record [0 ].message )
143-
144126 class MyInheritedPageNumberPagination (pagination .PageNumberPagination ):
145127 """
146128 Inherit the default values
@@ -157,20 +139,11 @@ class MyOverridenPageNumberPagination(pagination.PageNumberPagination):
157139 @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
158140 reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
159141 def test_my_page_number_deprecation (self ):
160- with pytest .warns (PendingDeprecationWarning ) as record :
142+ with pytest .warns (DeprecationWarning ) as record :
161143 self .MyInheritedPageNumberPagination ()
162144 assert len (record ) == 1
163145 assert 'PageNumberPagination will change in release 3.0' in str (record [0 ].message )
164146
165147 with pytest .warns (None ) as record :
166148 self .MyOverridenPageNumberPagination ()
167149 assert len (record ) == 0
168-
169- @pytest .mark .xfail ((sys .version_info .major , sys .version_info .minor ) == (2 , 7 ),
170- reason = "python2.7 fails to generate DeprecationWarrning for unknown reason" )
171- def test_my_jsonapi_page_number_deprecation (self ):
172- with pytest .warns (PendingDeprecationWarning ) as record :
173- pagination .JsonApiPageNumberPagination ()
174- assert len (record ) == 1
175- assert 'JsonApiPageNumberPagination will be renamed to PageNumberPagination' \
176- in str (record [0 ].message )
0 commit comments