We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfb654b commit 47836cfCopy full SHA for 47836cf
1 file changed
tests.py
@@ -1,9 +1,28 @@
1
from unittest import TestCase
2
3
+from flask import Flask
4
+from flask import _app_ctx_stack as stack
5
+from flask_pyfcm import FCM
6
+from pyfcm import FCMNotification
7
8
class FCMExtensionTest(TestCase):
9
+
10
def setUp(self):
- pass
11
+ self.app = Flask('unit_tests')
12
13
14
+ self.fcm = FCM()
15
16
+ def create_app():
17
+ app = Flask(__name__)
18
+ app.config['FCM_API_KEY'] = 'test-key'
19
+ app.config['FCM_PROXY_DICT'] = {}
20
+ self.fcm.init_app(app)
21
+ return app
22
23
+ self.app = create_app()
24
- def test(self):
25
+ def test_001_application_context(self):
26
+ with self.app.app_context():
27
+ self.fcm.push_service
28
+ self.assertIsInstance(stack.top.fcm_service, FCMNotification)
0 commit comments