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/tests_homepage.py

13 lines
517 B
Python
Raw Normal View History

2016-09-11 21:26:30 +01:00
from tests.TestWrapper import TestCase
import os.path
class HomepageTestCase(TestCase):
def test_blog_links(self):
content = self.client.get('index.html')
blogs = content.find('section', id='blog').find_all('div', class_="col-xs-12")
self.assertTrue(len(blogs) <= 4)
for post in content.find('section', id='blog').find_all('div', class_="col-xs-12"):
url = os.path.join(post.find('a').attrs['href'], 'index.html')
self.assertTrue(self.client.exists(url))