Skip to content

Commit 3b83726

Browse files
committed
Fix Injector 0.13.2 test compatibility
This didn't affect the main code, just a test that was written a bit incorrectly (Injector needs scopes to inherit from Scope).
1 parent 12ff467 commit 3b83726

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flask_injector_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import flask_restful
77
import flask_restplus
88
from eventlet import greenthread
9-
from injector import __version__ as injector_version, CallableProvider, inject
9+
from injector import __version__ as injector_version, CallableProvider, inject, Scope
1010
from flask import Blueprint, Flask
1111
from flask.templating import render_template_string
1212
from flask.views import View
@@ -85,7 +85,7 @@ def test_resets():
8585

8686
counter = [0]
8787

88-
class Scope(object):
88+
class OurScope(Scope):
8989
def __init__(self, injector):
9090
pass
9191

@@ -99,7 +99,7 @@ def cleanup(self):
9999
def index():
100100
return 'asd'
101101

102-
FlaskInjector(app, request_scope_class=Scope)
102+
FlaskInjector(app, request_scope_class=OurScope)
103103

104104
eq_(counter[0], 0)
105105

0 commit comments

Comments
 (0)