fix: ensure unit test run without external FLASK_APP
authorINOPIAE <m.maengel@inopiae.de>
Thu, 10 Dec 2020 23:15:00 +0000 (00:15 +0100)
committerFelix Dörre <felix@dogcraft.de>
Sat, 12 Dec 2020 14:24:31 +0000 (15:24 +0100)
tests/test_user_api.py

index 665961e..1bec464 100644 (file)
@@ -24,7 +24,7 @@ class GeneralTests(BasicTest):
 
     def test_create_user(self):
         user = 'John Doe'
-        runner = CliRunner()
+        runner = app.test_cli_runner()
         result = runner.invoke(create_user, [user])
         assert result.exit_code == 0
         self.assertIn("User 'John Doe' inserted.", result.output)