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

26 lines
775 B
Python
Raw Normal View History

2018-04-06 11:58:07 +00:00
import configparser, time, datetime, os
class TestData(object):
def __init__(self):
2018-04-06 11:58:07 +00:00
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-06 11:58:07 +00:00
#create unique identificator for PRs, issues ect
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()