1
Fork 0

rearrange tests

This commit is contained in:
Jake Howard 2016-10-02 11:37:19 +01:00
parent c036c17a54
commit 45fb57dafd
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 17 additions and 18 deletions

View file

@ -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'))

View file

@ -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'))