Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Fix flake8 complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Sep 21, 2020
1 parent d8e6532 commit 7fce7fb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hamlpy/test/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_read_ruby_style_attribute_dict(self):
) == OrderedDict([('class', 'test'), ('id', 'something'), ('foo', 'bar')])

# attribute values can be multi-line Haml
assert dict(self._parse("""{
haml = """{
'class':
- if forloop.first
link-first
Expand All @@ -98,8 +98,8 @@ def test_read_ruby_style_attribute_dict(self):
link-last
'href':
- url 'some_view'
}"""
)) == {
}"""
assert dict(self._parse(haml)) == {
'class': '{% if forloop.first %} link-first {% else %} {% if forloop.last %} link-last {% endif %} {% endif %}', # noqa
'href': "{% url 'some_view' %}"
}
Expand Down Expand Up @@ -154,7 +154,7 @@ def test_read_html_style_attribute_dict(self):
assert dict(self._parse('(foo=bar)')) == {'foo': '{{ bar }}'}

# attribute values can be multi-line Haml
assert dict(self._parse("""(
haml = """(
class=
- if forloop.first
link-first
Expand All @@ -164,11 +164,11 @@ def test_read_html_style_attribute_dict(self):
link-last
href=
- url 'some_view'
)"""
)) == {
)"""
assert dict(self._parse(haml)) == {
'class': '{% if forloop.first %} link-first {% else %} {% if forloop.last %} link-last {% endif %} {% endif %}', # noqa
'href': "{% url 'some_view' %}"
}
}

def test_empty_attribute_name_raises_error(self):
# empty quoted string in Ruby new style
Expand Down

0 comments on commit 7fce7fb

Please sign in to comment.