Skip to content

Commit

Permalink
💚 update test codes
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Aug 10, 2019
1 parent a370263 commit d82f117
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_handlebar_engine.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from nose.tools import eq_
from moban.plugins import ENGINES, BaseEngine
from moban.plugins import ENGINES
from moban_handlebars.engine import EngineHandlebars


Expand All @@ -17,13 +17,13 @@ def test_handlebars_template_not_found():

def test_handlebars_template_type():
engine = ENGINES.get_engine("hbs", [], "")
assert engine.engine_cls == EngineHandlebars
assert engine.engine.__class__.__name__ == 'EngineHandlebars'


def test_handlebars_file_tests():
output = "test.txt"
path = os.path.join("tests", "fixtures", "handlebars_tests")
engine = BaseEngine([path], path, EngineHandlebars)
engine = ENGINES.get_engine("hbs", [path], path)
engine.render_to_file("file_tests.template", "file_tests.json", output)
with open(output, "r") as output_file:
content = output_file.read()
Expand All @@ -35,7 +35,7 @@ def test_handlebars_string_template():
template_string = "{{test}}"
output = "test.txt"
path = os.path.join("tests", "fixtures", "handlebars_tests")
engine = BaseEngine([path], path, EngineHandlebars)
engine = ENGINES.get_engine("hbs", [path], path)
engine.render_string_to_file(template_string, "file_tests.json", output)
with open(output, "r") as output_file:
content = output_file.read()
Expand Down

0 comments on commit d82f117

Please sign in to comment.