mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
converted asserts of browsable_api_nested test to pytest
This commit is contained in:
parent
7246097818
commit
4fba1b1ff9
|
@ -35,8 +35,8 @@ class DropdownWithAuthTests(TestCase):
|
||||||
@override_settings(ROOT_URLCONF='tests.browsable_api.test_browsable_nested_api')
|
@override_settings(ROOT_URLCONF='tests.browsable_api.test_browsable_nested_api')
|
||||||
def test_login(self):
|
def test_login(self):
|
||||||
response = self.client.get('/api/')
|
response = self.client.get('/api/')
|
||||||
self.assertEqual(200, response.status_code)
|
assert 200 == response.status_code
|
||||||
content = response.content.decode('utf-8')
|
content = response.content.decode('utf-8')
|
||||||
self.assertIn('form action="/api/"', content)
|
assert 'form action="/api/"' in content
|
||||||
self.assertIn('input name="nested.one"', content)
|
assert 'input name="nested.one"' in content
|
||||||
self.assertIn('input name="nested.two"', content)
|
assert 'input name="nested.two"' in content
|
||||||
|
|
Loading…
Reference in New Issue
Block a user