示例#1
0
 def test_default_content_from_url(self):
     app = Application()
     app.get_data_from_url('https://json.medrating.org/todos',
                           'https://json.medrating.org/users')
     app.generate_reports(no_file=True)
示例#2
0
 def test_user1_has_no_tasks(self):
     app = Application()
     app.get_data_from_file('./data/user1_has_no_tasks.json',
                            './data/default_users.json')
     app.generate_reports(no_file=True)
示例#3
0
 def test_empty_content(self):
     app = Application()
     app.get_data_from_file('./data/empty_tasks.json',
                            './data/default_users.json')
     app.generate_reports(no_file=True)
示例#4
0
 def test_broken_content(self):
     app = Application()
     app.get_data_from_file('./data/broken_tasks.json',
                            './data/broken_users.json')
     app.generate_reports(no_file=True)
示例#5
0
import sys
from application import Application

if __name__ == "__main__":

    app = Application()
    app.get_data_from_url('https://json.medrating.org/todos',
                          'https://json.medrating.org/users')

    if (app.tasks == {}) or (app.users == {}):
        print("Data collecting failed. Program aborted.")
        sys.exit()

    app.generate_reports('./tasks/')