Created
June 9, 2021 15:23
-
-
Save brno32/8570ad566e6fb957e7223ceab4d8bd32 to your computer and use it in GitHub Desktop.
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
import os | |
from simple_mockforce import mock_salesforce | |
from simple_salesforce import Salesforce | |
@mock_salesforce | |
def test_api(): | |
salesforce = Salesforce( | |
username=os.getenv["SFDC_USERNAME"], | |
password=os.getenv["SFDC_PASSWORD"], | |
security_token=os.getenv["SFDC_SECURITY_TOKEN"] | |
) | |
response = salesforce.Account.create({"Name": "Test Account"}) | |
account_id = response["id"] | |
account = salesforce.Account.get(account_id) | |
assert account["Name"] == "Test Account" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment