def setUpClass(cls):
"""Do an initial DB clean up in case something went wrong the last time.
If a test failed really badly, the DB might be in a bad state despite
attempts to clean up during tearDown().
"""
warnings.filterwarnings('ignore')
cls.rmt = BossRemote('test.cfg', API_VER)
# Turn off SSL cert verification. This is necessary for interacting with
# developer instances of the Boss.
cls.rmt.project_service.session_send_opts = {'verify': False}
cls.rmt.metadata_service.session_send_opts = {'verify': False}
cls.rmt.volume_service.session_send_opts = {'verify': False}
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
cls.user = 'user_test_user{}'.format(random.randint(0, 9999))
cls.first_name = 'john'
cls.last_name = 'doe'
cls.email = 'jd{}@me.com'.format(random.randint(0, 9999))
cls.password = 'password'
评论列表
文章目录