-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
22 lines (20 loc) · 661 Bytes
/
test.py
File metadata and controls
22 lines (20 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3.6
import os
import unittest
# class for handling a set of commands
# from app import *
from app import *
def main():
"""This function test will execute all the test_*.py under the folder tests
for test make sure (virtual) env STAGE already set for test condition, such as (GNU/Linux) run in terminal
export STAGE="dev"
"""
Event.create_table(read_capacity_units=1, write_capacity_units=1)
tests = unittest.TestLoader().discover('./tests', pattern='test*.py')
result = unittest.TextTestRunner(verbosity=2).run(tests)
Event.delete_table()
if result.wasSuccessful():
return 0
return 1
if __name__ == '__main__':
main()