EMAILBOT: read_find_contact_email_list()
The action request method should:
- Return a list with the contact_mail of all providers
- TODO: Potentially, make extraction based on action request
Pseudo-Code:
test_read_find_contact_email_list():
"GIVEN: A json file with subkeys that contain provider mails"
"WHEN: File is being accessed"
"THEN: Email can be read and returned in a list"
def get_all_contact_emails(providers):
for provider in providers:
for key in provider:
# TODO: instance("contact_mail")
if key == "contact_mail":
list_provider_mail.append(key)
list_provider_mail = {}
with open(providers.json) as providers:
list_provider_mail = self.get_contact_emails(providers)
assert(len(list_provider_mail) > 0)
assert(list_provider_mail.get("contact_email") is not None)