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

18 lines
556 B
Python

from tests.TestWrapper 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'))