File tree Expand file tree Collapse file tree 3 files changed +19
-21
lines changed
Expand file tree Collapse file tree 3 files changed +19
-21
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- import os
32
43import pytest
54from sage_utils .amqp .extension import AmqpExtension
65from sage_utils .amqp .base import AmqpWorker
76
8-
9- class FakeConfig (object ):
10-
11- def get (self , key , default = None ):
12- return os .environ .get (key , default )
13-
14-
15- class Application (object ):
16-
17- def __init__ (self , config = None ):
18- super (Application , self ).__init__ ()
19- self .config = config
7+ from tests .fixtures import Application , FakeConfig
208
219
2210class CustomWorker (AmqpWorker ):
Original file line number Diff line number Diff line change 1+ import os
2+
3+
4+ class FakeConfig (object ):
5+
6+ def get (self , key , default = None ):
7+ return os .environ .get (key , default )
8+
9+
10+ class Application (object ):
11+
12+ def __init__ (self , config = None ):
13+ super (Application , self ).__init__ ()
14+ self .config = config
Original file line number Diff line number Diff line change 22from sage_utils .extension import BaseExtension
33
44
5- class FakeConfig (object ):
5+ from tests .fixtures import Application , FakeConfig as BaseFakeConfig
6+
7+
8+ class FakeConfig (BaseFakeConfig ):
69 key = 'value'
710
811
@@ -11,13 +14,6 @@ class CustomExtension(BaseExtension):
1114 app_attribute = 'ext'
1215
1316
14- class Application (object ):
15-
16- def __init__ (self , config = None ):
17- super (Application , self ).__init__ ()
18- self .config = config
19-
20-
2117def test_constructor_with_init ():
2218 app = Application ()
2319 extension = CustomExtension (app )
You can’t perform that action at this time.
0 commit comments