diff --git a/tests/test_schemas.py b/tests/test_schemas.py index e196a1f61..99b87fc85 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -90,7 +90,7 @@ class TestRouterGeneratedSchema(TestCase): def test_anonymous_request(self): client = APIClient() response = client.get('/', HTTP_ACCEPT='application/coreapi+json') - self.assertEqual(response.status_code, 200) + assert response.status_code == 200 expected = coreapi.Document( url='', title='Example API', @@ -125,13 +125,13 @@ class TestRouterGeneratedSchema(TestCase): } } ) - self.assertEqual(response.data, expected) + assert response.data == expected def test_authenticated_request(self): client = APIClient() client.force_authenticate(MockUser()) response = client.get('/', HTTP_ACCEPT='application/coreapi+json') - self.assertEqual(response.status_code, 200) + assert response.status_code == 200 expected = coreapi.Document( url='', title='Example API', @@ -217,7 +217,7 @@ class TestRouterGeneratedSchema(TestCase): } } ) - self.assertEqual(response.data, expected) + assert response.data == expected class DenyAllUsingHttp404(permissions.BasePermission): @@ -312,7 +312,7 @@ class TestSchemaGenerator(TestCase): } } ) - self.assertEqual(schema, expected) + assert schema == expected @unittest.skipUnless(coreapi, 'coreapi is not installed') @@ -365,7 +365,7 @@ class TestSchemaGeneratorNotAtRoot(TestCase): } } ) - self.assertEqual(schema, expected) + assert schema == expected @unittest.skipUnless(coreapi, 'coreapi is not installed') @@ -400,7 +400,7 @@ class TestSchemaGeneratorWithRestrictedViewSets(TestCase): }, } ) - self.assertEqual(schema, expected) + assert schema == expected @unittest.skipUnless(coreapi, 'coreapi is not installed')