mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Added tests
This commit is contained in:
20
tests/Noted_test.py
Normal file
20
tests/Noted_test.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import unittest
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from frontend.api import api
|
||||
from frontend.ui import ui
|
||||
from Noted import _create_app
|
||||
|
||||
class Test_Noted(unittest.TestCase):
|
||||
def test_create_app(self):
|
||||
result = _create_app()
|
||||
self.assertIsInstance(result, Flask)
|
||||
|
||||
self.assertEqual(result.blueprints.get('ui'), ui)
|
||||
self.assertEqual(result.blueprints.get('api'), api)
|
||||
|
||||
handlers = result.error_handler_spec[None].keys()
|
||||
required_handlers = 404, 400, 405, 500
|
||||
for handler in required_handlers:
|
||||
self.assertIn(handler, handlers)
|
||||
Reference in New Issue
Block a user