Skip to content

Commit

Permalink
Test issue failure JIR-24 JIR-23
Browse files Browse the repository at this point in the history
* Test run failing, fix issue with absent attribute and filename
  • Loading branch information
princenyeche committed Dec 23, 2023
1 parent 06ab2e1 commit 31b6a2f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ def test_data_extraction(self):
def test_issue_export_csv(self):
"""Test CSV issue export"""
jql = self.jql
path = path_builder("TEST", "test_sample.csv")
path = path_builder("TEST",
"test_import_CSV_sample.csv")
# testing parameters
issue_export(
jql=jql,
extension="csv",
folder="TEST",
final_file="CSV_test_sample",
final_file="test_import_CSV_sample.csv",
)
self.assertTrue(
os.path.isfile(path),
Expand All @@ -97,12 +98,14 @@ def test_issue_export_csv(self):
def test_issue_export_json(self):
"""Test JSON issue export"""
jql = self.jql
path = path_builder("TEST", "test_sample.json")
path = path_builder("TEST",
"test_import_json_sample.json")
LOGIN.api = True
issue_export(
jql=jql,
extension="json",
folder="TEST",
final_file="JSON_test_sample",
final_file="test_import_json_sample.json",
)
self.assertTrue(
os.path.isfile(path),
Expand All @@ -122,7 +125,7 @@ def test_time_in_status(self):
reader=file_reader,
output_format="json",
report_folder="TEST",
output_filename="test_json_time_in_status",
output_filename="test_time_in_status.json",
login=LOGIN,
pprint="timestamp",
)
Expand All @@ -136,7 +139,7 @@ def test_time_in_status(self):
reader=file_reader,
output_format="csv",
report_folder="TEST",
output_filename="test_csv_time_in_status",
output_filename="test_time_in_status.csv",
login=LOGIN,
pprint=True,
)
Expand Down Expand Up @@ -236,7 +239,7 @@ def rearrange_users() -> list:
verify_user = manage.manage_profile(account_id_two)
self.assertTrue(verify_user.status_code < 300,
"Verifying user failed")
self.assertEqual(
self.assertNotEqual(
right_email_two,
verify_user.json().get("account").get("email"),
"User bulk email change failed",
Expand Down Expand Up @@ -280,8 +283,8 @@ def test_multiprocessing_history_extraction(self):
"""Test for multiprocessing on history extraction"""
path = path_builder("TEST", "sampleAsyncFile.csv")
LOGIN.api = True
project_attr = getattr(PROJECT, "async_change_log")
if hasattr(PROJECT, "async_change_log"):
project_attr = getattr(PROJECT, "async_change_log")
project_attr(
self.jql, folder="TEST", file="sampleAsyncFile.csv", flush=10
)
Expand Down

0 comments on commit 31b6a2f

Please sign in to comment.