open-bounty/test/end-to-end/tests/__init__.py

24 lines
774 B
Python
Raw Normal View History

2018-04-06 11:58:07 +00:00
import configparser, time, datetime, os
2018-04-09 10:07:41 +00:00
class TestData(object):
def __init__(self):
self.test_name = None
self.config = configparser.ConfigParser()
2018-04-06 11:58:07 +00:00
# put config.ini to /test/end-to-end/tests folder (same directory where config_example.ini is placed
self.tests_path = os.path.abspath(os.path.dirname(__file__))
self.config.read(os.path.join(self.tests_path, 'config.ini'))
2018-04-09 10:07:41 +00:00
# create unique identificator for PRs, issues ect
2018-04-06 11:58:07 +00:00
ts = time.time()
st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
self.date_time = st
# self.issue['title'] is set in GithubPage::create_new_bounty
# self.issue['id'] is set in GithubPage::create_new_bounty
2018-04-06 11:58:07 +00:00
test_data = TestData()