2019-03-11 22:26:01 +00:00
|
|
|
import os
|
|
|
|
|
2017-10-03 10:59:45 +00:00
|
|
|
import unittest
|
2017-12-13 13:22:31 +00:00
|
|
|
import inspect
|
2017-10-03 10:59:45 +00:00
|
|
|
|
2019-08-31 08:14:41 +00:00
|
|
|
os.environ["OGN_CONFIG_MODULE"] = "config/test.py"
|
2019-03-11 22:26:01 +00:00
|
|
|
|
2019-08-31 08:14:41 +00:00
|
|
|
import app.model # noqa: E402
|
2017-10-03 10:59:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestStringMethods(unittest.TestCase):
|
|
|
|
def test_string(self):
|
|
|
|
|
2017-12-13 13:22:31 +00:00
|
|
|
try:
|
2019-08-31 08:14:41 +00:00
|
|
|
for name, obj in inspect.getmembers(app.model):
|
2017-12-13 13:22:31 +00:00
|
|
|
print("Testing: {}".format(name))
|
|
|
|
if inspect.isclass(obj):
|
|
|
|
print(obj())
|
|
|
|
except AttributeError as e:
|
|
|
|
raise AssertionError(e)
|
2017-10-03 10:59:45 +00:00
|
|
|
|
2017-12-16 09:22:26 +00:00
|
|
|
|
2019-08-31 08:14:41 +00:00
|
|
|
if __name__ == "__main__":
|
2017-10-03 10:59:45 +00:00
|
|
|
unittest.main()
|