Browse Source

fix endline in the signal.py

pull/1509/head
Alexander Pantyukhin 10 years ago committed by Markus Unterwaditzer
parent
commit
1fbeb337c4
  1. 6
      tests/test_signals.py

6
tests/test_signals.py

@ -59,16 +59,14 @@ def test_before_render_template():
context['whiskey'] = 43
recorded.append((template, context))
flask.before_render_template.connect(record, app)
try:
with flask.before_render_template.connected_to(record):
rv = app.test_client().get('/')
assert len(recorded) == 1
template, context = recorded[0]
assert template.name == 'simple_template.html'
assert context['whiskey'] == 43
assert rv.data == b'<h1>43</h1>'
finally:
flask.before_render_template.disconnect(record, app)
def test_request_signals():
app = flask.Flask(__name__)

Loading…
Cancel
Save