Skip to content

Commit

Permalink
Fix texts for utils (remove context, fix expected values, fix dict typo)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinckel committed Jul 28, 2024
1 parent ea5cc06 commit 40eab4d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions framarama/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def test_evaluate_no_resolver_key_missing(self):
self.assertEqual('', utils.Template.render("{{missing}}"))

def test_evaluate_keys(self):
self.assertEqual('value', utils.Template.render("{{test['test']}}", {
self.assertEqual('value', utils.Template.render("{{test}}", {
'test': 'value'
}))

Expand All @@ -587,9 +587,9 @@ def test_evaluate_split(self):
'test': 'this is a test'
}))

def test_valuate_keys(self):
def test_evaluate_keys(self):
self.assertEqual('aceh', utils.Template.render('{{test|keys|join}}', {
'test', {'a':'b', 'c':'d', 'e':'f', 'h':'i'}
'test': {'a':'b', 'c':'d', 'e':'f', 'h':'i'}
}))

def test_evaluate_long(self):
Expand All @@ -605,7 +605,6 @@ def test_evaluate_long_quotes(self):
self.assertEqual('\nhello """ world """\n', utils.Template.render(_text))

def test_evaluate_long_html(self):
_context = context.Context()
_text = """
<html>
<body>
Expand All @@ -616,7 +615,6 @@ def test_evaluate_long_html(self):
self.assertEqual('\n<html>\n<body>\n <a href="http://github.com/framarama/">framaRAMA</a>\n</body>\n</html>\n', utils.Template.render(_text))

def test_evaluate_long_script(self):
_context = context.Context()
_text = """
<html>
<head>
Expand Down

0 comments on commit 40eab4d

Please sign in to comment.