예제 #1
0
 def test_change_app(self):
     some_app = object()
     set_current_app(some_app)
     self.assertIs(some_app, get_current_app())
예제 #2
0
 def test_no_app_created(self):
     with self.assertRaises(RuntimeError):
         get_current_app()
예제 #3
0
 def test_current_app(self):
     some_app = ThriftWorker()
     self.assertIs(some_app, get_current_app())