gokulakrishnansvm commented on code in PR #7400: URL: https://github.com/apache/trafficcontrol/pull/7400#discussion_r1142572320
########## traffic_ops/testing/api_contract/v4/test_cdns.py: ########## @@ -0,0 +1,68 @@ +"""Api Contract Test Case for cdns endpoint""" +import json +import logging +import pytest + +# Create and configure logger +logger = logging.getLogger() + + [email protected](name="get_cdn_data") +def get_cdn_prereq_data(): + """PyTest Fixture to store prereq data for cdns endpoint""" + # Response keys for cdns endpoint + with open('prerequisite_data.json', encoding="utf-8", mode='r') as prereq_file: + data = json.load(prereq_file) + cdn_data = data["cdns"] + return cdn_data + + +def test_get_cdn(to_session, get_cdn_data, cdn_prereq): Review Comment: Test function doesn't have return value. Please correct me if i'm wrong. And argument types were added before. ########## traffic_ops/testing/api_contract/v4/test_cdns.py: ########## @@ -0,0 +1,68 @@ +"""Api Contract Test Case for cdns endpoint""" +import json +import logging +import pytest + +# Create and configure logger +logger = logging.getLogger() + + [email protected](name="get_cdn_data") +def get_cdn_prereq_data(): + """PyTest Fixture to store prereq data for cdns endpoint""" + # Response keys for cdns endpoint + with open('prerequisite_data.json', encoding="utf-8", mode='r') as prereq_file: + data = json.load(prereq_file) + cdn_data = data["cdns"] + return cdn_data + + +def test_get_cdn(to_session, get_cdn_data, cdn_prereq): + """Test step to validate keys, values and data types from cdns endpoint response Review Comment: Added punctuation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
