1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #23919 -- Replaced super(ClassName, self) with super() in docs.

This commit is contained in:
chillaranand
2017-01-22 12:27:14 +05:30
committed by Tim Graham
parent 2d96c027f5
commit dc165ec8e5
36 changed files with 103 additions and 104 deletions

View File

@@ -704,13 +704,13 @@ If your tests make any database queries, use subclasses
@classmethod
def setUpClass(cls):
super(MyTestCase, cls).setUpClass()
super().setUpClass()
...
@classmethod
def tearDownClass(cls):
...
super(MyTestCase, cls).tearDownClass()
super().tearDownClass()
Be sure to account for Python's behavior if an exception is raised during
``setUpClass()``. If that happens, neither the tests in the class nor
@@ -880,14 +880,14 @@ The code for this test may look as follows::
@classmethod
def setUpClass(cls):
super(MySeleniumTests, cls).setUpClass()
super().setUpClass()
cls.selenium = WebDriver()
cls.selenium.implicitly_wait(10)
@classmethod
def tearDownClass(cls):
cls.selenium.quit()
super(MySeleniumTests, cls).tearDownClass()
super().tearDownClass()
def test_login(self):
self.selenium.get('%s%s' % (self.live_server_url, '/login/'))