From 45fb57dafdde033f74708368996abbabbab81189 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 2 Oct 2016 11:37:19 +0100 Subject: [PATCH] rearrange tests --- tests/test_client.py | 18 ------------------ tests/tests_common.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) delete mode 100644 tests/test_client.py diff --git a/tests/test_client.py b/tests/test_client.py deleted file mode 100644 index 6e62675..0000000 --- a/tests/test_client.py +++ /dev/null @@ -1,18 +0,0 @@ -from tests import TestCase -from bs4 import BeautifulSoup - - -class TestClientTestCase(TestCase): - def test_client_fails(self): - with self.assertRaises(FileNotFoundError): - self.client.get('foo.bar') - - def test_client_gets_data(self): - content = self.client.get('index.html') - self.assertIsInstance(content, BeautifulSoup) - - def test_file_exists(self): - self.assertTrue(self.client.exists('index.html')) - - def test_file_doesnt_exist(self): - self.assertFalse(self.client.exists('foo.bar')) diff --git a/tests/tests_common.py b/tests/tests_common.py index 259b680..5c3bb9b 100644 --- a/tests/tests_common.py +++ b/tests/tests_common.py @@ -1,5 +1,6 @@ from tests import TestCase from config import settings, DotDictionary +from bs4 import BeautifulSoup class CorePagesTestCase(TestCase): @@ -96,3 +97,19 @@ class WrappedSettingTestCase(TestCase): def test_returns_dict(self): self.assertIsInstance(settings.accounts, DotDictionary) + + +class TestClientTestCase(TestCase): + def test_client_fails(self): + with self.assertRaises(FileNotFoundError): + self.client.get('foo.bar') + + def test_client_gets_data(self): + content = self.client.get('index.html') + self.assertIsInstance(content, BeautifulSoup) + + def test_file_exists(self): + self.assertTrue(self.client.exists('index.html')) + + def test_file_doesnt_exist(self): + self.assertFalse(self.client.exists('foo.bar'))