update google drive file link in json

This commit is contained in:
Jason Lee
2024-03-09 18:06:48 +08:00
parent d68e7369b7
commit 2291af394f
16 changed files with 117 additions and 60 deletions

View File

@@ -1075,8 +1075,8 @@ def get_data_delete_automacally(env, config: Dict[str, str]):
try:
content = env.controller.get_file(preference_file_path)
data = json.loads(content)
data_delete_state = data["profile"]["exit_type"]
return data_delete_state
data_delete_state = data["profile"].get("default_content_setting_values", None)
return "true" if data_delete_state is not None else "false"
except Exception as e:
logger.error(f"Error: {e}")
return "Google"

View File

@@ -17,8 +17,11 @@ def compare_conference_city_in_order( actual_city_list_path, expected_city):
print("actual_city_list_path:")
print(actual_city_list)
wrong_list = []
for i in range(len(actual_city_list)):
if expected_city_list[i] not in actual_city_list[i]:
wrong_list.append(i)
print(f"Expected city {expected_city_list[i]}; Actual city {actual_city_list[i]}")
try:
for i in range(len(actual_city_list)):
if expected_city_list[i] not in actual_city_list[i]:
wrong_list.append(i)
print(f"Expected city {expected_city_list[i]}; Actual city {actual_city_list[i]}")
except:
return False
return True if len(wrong_list) == 0 else False

View File

@@ -98,13 +98,16 @@ def fuzzy_place_math(result_file_path, rules) -> float:
for para in doc.paragraphs:
words_list.extend(para.text.split())
# Print out the list of extracted words
print("Your Answers: ")
print(words_list)
fuzzy_score_list = []
for word in words_list:
if not any(ans in word for ans in expect):
print("Wrong place:", word)
return 0
return 1
max_score = 0
for ans in expect:
score = fuzz.ratio(word, ans)
max_score = max(max_score, score)
fuzzy_score_list.append(max_score)
return sum(fuzzy_score_list) / len(fuzzy_score_list)
def check_csv(result: str, rules: Dict[str, List[Dict[str, str]]]) -> float:
"""