Skip to content

Commit

Permalink
fix endline in the signal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Pantyukhin authored and untitaker committed Jun 17, 2015
1 parent d53d5c7 commit 1fbeb33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion flask/signals.py
Expand Up @@ -53,4 +53,4 @@ def _fail(self, *args, **kwargs):
appcontext_tearing_down = _signals.signal('appcontext-tearing-down')
appcontext_pushed = _signals.signal('appcontext-pushed')
appcontext_popped = _signals.signal('appcontext-popped')
message_flashed = _signals.signal('message-flashed')
message_flashed = _signals.signal('message-flashed')
6 changes: 2 additions & 4 deletions tests/test_signals.py
Expand Up @@ -59,16 +59,14 @@ def record(sender, template, context):
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__)
Expand Down

0 comments on commit 1fbeb33

Please sign in to comment.