-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtest_db_model.py
More file actions
29 lines (22 loc) · 710 Bytes
/
test_db_model.py
File metadata and controls
29 lines (22 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
#
# Test custom model features
#
# :copyright: 2020 Sonu Kumar
# :license: BSD-3-Clause
#
import unittest
from flask import Flask
from error_tracker import AppErrorTracker
from tests.utils import TestErrorModel
from .test_basic import BasicTest
from tests.utils import ViewPermission
class CustomModelClassTest(BasicTest, unittest.TestCase):
db_prefix = "CustomModelClassTest"
def _setup(self, db_name):
app = Flask(__name__)
TestErrorModel.delete_all()
error_tracker = AppErrorTracker(app=app, model=TestErrorModel, view_permission=ViewPermission())
return app, None, error_tracker
if __name__ == '__main__':
unittest.main()