Skip to content

Commit 3d2baa4

Browse files
author
Ryan P Kilby
committed
Convert bare assert to unittest assertion
1 parent 138c3c0 commit 3d2baa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_backends.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ class SimpleViewSet(views.FilterFieldsUserViewSet):
6060
</form>
6161
""")
6262

63-
def test_request_obj_is_passed(self):
63+
def test_request_obj_is_passed(test):
6464
"""
6565
Ensure that the request object is passed from the backend to the filterset.
6666
See: https://github.com/philipn/django-rest-framework-filters/issues/149
6767
"""
6868
class RequestCheck(FilterSet):
6969
def __init__(self, *args, **kwargs):
7070
super(RequestCheck, self).__init__(*args, **kwargs)
71-
assert self.request is not None
71+
test.assertIsNotNone(self.request)
7272

7373
class Meta:
7474
model = models.User

0 commit comments

Comments
 (0)