def test_hrm_create_employee(self): # emp_id = random.randint(10000, 99999) emp_id = str(int(time.time() * 100))[-6::] api = Api() api.sign_in() resp = api.add_employee(emp_id, "Billy", "Elliot", file=f'{PROJ_PATH}/empty.png') self.write_to_file(self._testMethodName, resp.text) self.assertIn('/pim/viewPersonalDetails/empNumber/', resp.url) emp_number = resp.url.split('/')[-1]
def tearDown(self) -> None: if hasattr(self, 'user_id'): api = Api() api.sign_in() api.delete_user(self.user_id) super().tearDown()