From 2246f019eaf6d1e4ff0217adc06312832c10797d Mon Sep 17 00:00:00 2001 From: Kfir Hadas Date: Wed, 7 Jun 2017 19:32:45 +0300 Subject: [PATCH] Use spaces --- tests/test_nyaa.py | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/test_nyaa.py b/tests/test_nyaa.py index e3736ce..478a4c0 100644 --- a/tests/test_nyaa.py +++ b/tests/test_nyaa.py @@ -6,48 +6,48 @@ import nyaa class NyaaTestCase(unittest.TestCase): - def setUp(self): - self.db, nyaa.app.config['DATABASE'] = tempfile.mkstemp() - nyaa.app.config['TESTING'] = True - self.app = nyaa.app.test_client() - with nyaa.app.app_context(): - nyaa.db.create_all() + def setUp(self): + self.db, nyaa.app.config['DATABASE'] = tempfile.mkstemp() + nyaa.app.config['TESTING'] = True + self.app = nyaa.app.test_client() + with nyaa.app.app_context(): + nyaa.db.create_all() - def tearDown(self): - os.close(self.db) - os.unlink(nyaa.app.config['DATABASE']) + def tearDown(self): + os.close(self.db) + os.unlink(nyaa.app.config['DATABASE']) - def test_index_url(self): - rv = self.app.get('/') - assert b'Browse :: Nyaa' in rv.data - assert b'Guest' in rv.data + def test_index_url(self): + rv = self.app.get('/') + assert b'Browse :: Nyaa' in rv.data + assert b'Guest' in rv.data - def test_upload_url(self): - rv = self.app.get('/upload') - assert b'Upload Torrent' in rv.data - assert b'You are not logged in, and are uploading anonymously.' in rv.data + def test_upload_url(self): + rv = self.app.get('/upload') + assert b'Upload Torrent' in rv.data + assert b'You are not logged in, and are uploading anonymously.' in rv.data - def test_rules_url(self): - rv = self.app.get('/rules') - assert b'Site Rules' in rv.data + def test_rules_url(self): + rv = self.app.get('/rules') + assert b'Site Rules' in rv.data - def test_help_url(self): - rv = self.app.get('/help') - assert b'Using the Site' in rv.data + def test_help_url(self): + rv = self.app.get('/help') + assert b'Using the Site' in rv.data - def test_rss_url(self): - rv = self.app.get('/?page=rss') - assert b'/xmlns/nyaa' in rv.data + def test_rss_url(self): + rv = self.app.get('/?page=rss') + assert b'/xmlns/nyaa' in rv.data - def test_login_url(self): - rv = self.app.get('/login') - assert b'Username or email address' in rv.data + def test_login_url(self): + rv = self.app.get('/login') + assert b'Username or email address' in rv.data - def test_registry(self): - rv = self.app.get('/register') - assert b'Username' in rv.data - assert b'Password' in rv.data + def test_registry(self): + rv = self.app.get('/register') + assert b'Username' in rv.data + assert b'Password' in rv.data if __name__ == '__main__': - unittest.main() + unittest.main()