1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/tests/test_client.py

19 lines
544 B
Python
Raw Normal View History

2016-09-30 23:13:41 +01:00
from tests import TestCase
2016-09-11 21:26:30 +01:00
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'))