File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77from tests .testapp .models import ExampleModel
88
9+
910@pytest .fixture
1011def api_client ():
1112 return APIClient ()
@@ -20,8 +21,13 @@ def test_simple_viewset_model(api_client):
2021 response = api_client .get ("/examples/" )
2122
2223 assert response .status_code == 200
23- assert response .headers ["Content-Type" ] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8"
24- assert response .headers ["content-disposition" ] == "attachment; filename=my_export.xlsx"
24+ assert (
25+ response .headers ["Content-Type" ]
26+ == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8"
27+ )
28+ assert (
29+ response .headers ["content-disposition" ] == "attachment; filename=my_export.xlsx"
30+ )
2531
2632 workbook_buffer = io .BytesIO (response .content )
2733 workbook = load_workbook (workbook_buffer , read_only = True )
Original file line number Diff line number Diff line change 33from .testapp .views import ExampleViewSet
44
55router = routers .SimpleRouter ()
6- router .register (r' examples' , ExampleViewSet )
6+ router .register (r" examples" , ExampleViewSet )
77
88urlpatterns = router .urls
You can’t perform that action at this time.
0 commit comments