-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from nih-sparc/hubspot_contact_endpoint
added get hubspot contact properties endpoint
- Loading branch information
Showing
2 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,25 @@ def test_create_wrike_task(client): | |
) | ||
assert resp.status_code == 200 | ||
|
||
def test_get_hubspot_contact(client): | ||
r = client.get(f"/hubspot_contact_properties/[email protected]") | ||
assert r.status_code == 200 | ||
|
||
def test_subscribe_to_newsletter(client): | ||
http_method = "POST" | ||
endpoint = "/subscribe_to_newsletter" | ||
base_url = "http://localhost" # Default for Flask test client | ||
full_url = f"{base_url}{endpoint}" | ||
mock_body = {"email_address":"[email protected]","first_name":"Test Hubspot Webhook","last_name":"Do Not Delete"} | ||
response = client.post( | ||
endpoint, | ||
json=mock_body, | ||
headers={ | ||
"Content-Type": "application/json" | ||
} | ||
) | ||
assert response.status_code == 200 | ||
|
||
def test_hubspot_webhook(client): | ||
http_method = "POST" | ||
endpoint = "/hubspot_webhook" | ||
|