1
Fork 0

Update tests

This commit is contained in:
Jake Howard 2017-01-19 22:21:55 +00:00
parent 19ef62758a
commit c915be97bb
5 changed files with 6 additions and 6 deletions

View file

@ -28,13 +28,13 @@ def limit(line, length):
def get_title(instance): def get_title(instance):
return ( return (
get_attribute(instance, 'title') or (hasattr(instance, 'page') and get_attribute(instance.page, 'name')) or get_attribute(instance, 'name') or '' get_attribute(instance, 'title') or (hasattr(instance, 'page') and get_attribute(instance.page, 'name')) or get_attribute(instance, 'name') or ''
).title() )
def get_html_title(instance): def get_html_title(instance):
return ( return (
get_attribute(instance, 'html_title') or get_title(instance) get_attribute(instance, 'html_title') or get_title(instance)
).title() )
def get_image(instance): def get_image(instance):

View file

@ -51,7 +51,7 @@ class CommonPagesTestCase(TestCase):
def test_footer_links(self): def test_footer_links(self):
content = self.client.get('index.html') content = self.client.get('index.html')
footer = content.footer footer = content.footer
for link in footer.find('p', class_="social").find_all('a'): for link in footer.find('h2', class_="social").find_all('a'):
self.assertIn(link.attrs['alt'], social_settings['footer_accounts']) self.assertIn(link.attrs['alt'], social_settings['footer_accounts'])
self.assertIn("fa fa-", str(list(link.children)[0])) self.assertIn("fa fa-", str(list(link.children)[0]))

View file

@ -28,8 +28,8 @@ footer {
} }
.social { .social {
margin-bottom: 25px;
margin-top: 0; margin-top: 0;
margin-bottom: 25px;
a { a {
margin: 0 5px; margin: 0 5px;

View file

@ -12,7 +12,7 @@
} }
.outer-gutter { .outer-gutter {
padding: 0 $grid-gutter-width / 2;
@extend .no-gutter; @extend .no-gutter;
padding: 0 $grid-gutter-width / 2;
} }

View file

@ -4,7 +4,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<h2 class="social"> <h2 class="social">
{% for link in FOOTER_LINKS %} {% for link in FOOTER_LINKS %}
<a href="{{ link.url }}" class="footer-link"><i class="fa {{ link.icon }}"></i></a> <a href="{{ link.url }}" alt="{{ link.key }}" class="footer-link"><i class="fa {{ link.icon }}"></i></a>
{% endfor %} {% endfor %}
</h2> </h2>
</div> </div>