Skip to content

Commit

Permalink
fix: some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Anas12091101 committed Dec 4, 2024
1 parent 37addea commit 02bbfb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@
),
"get_queries_list",
[],
"https://test-emeritus-api.io/api/queries?api_key=test_external_course_sync_api_key",
"https://test-external-course-sync-api.io/api/queries?api_key=test_external_course_sync_api_key",
),
(
"courses.sync_external_courses.external_course_sync_api_client.requests.get",
MockResponse({"job": {"status": 1}}),
"get_job_status",
[12],
"https://test-emeritus-api.io/api/jobs/12?api_key=test_external_course_sync_api_key",
"https://test-external-course-sync-api.io/api/jobs/12?api_key=test_external_course_sync_api_key",
),
(
"courses.sync_external_courses.external_course_sync_api_client.requests.get",
MockResponse({"query_result": {"data": {}}}),
"get_query_result",
[20],
"https://test-emeritus-api.io/api/query_results/20?api_key=test_external_course_sync_api_key",
"https://test-external-course-sync-api.io/api/query_results/20?api_key=test_external_course_sync_api_key",
),
],
)
Expand All @@ -63,7 +63,7 @@ def test_external_course_sync_api_client_get_requests( # noqa: PLR0913
expected_api_url,
):
settings.EXTERNAL_COURSE_SYNC_API_KEY = "test_external_course_sync_api_key"
settings.EXTERNAL_COURSE_SYNC_API_BASE_URL = "https://test-emeritus-api.io"
settings.EXTERNAL_COURSE_SYNC_API_BASE_URL = "https://test-external-course-sync-api.io"
settings.EXTERNAL_COURSE_SYNC_API_REQUEST_TIMEOUT = 60

mock_get = mocker.patch(patch_request_path)
Expand All @@ -90,7 +90,7 @@ def test_get_query_response(mocker, settings):
start_date = end_date - timedelta(days=1)

settings.EXTERNAL_COURSE_SYNC_API_KEY = "test_external_course_sync_api_key"
settings.EXTERNAL_COURSE_SYNC_API_BASE_URL = "https://test-emeritus-api.io"
settings.EXTERNAL_COURSE_SYNC_API_BASE_URL = "https://test-external-course-sync-api.io"

mock_post = mocker.patch(
"courses.sync_external_courses.external_course_sync_api_client.requests.post"
Expand All @@ -100,7 +100,7 @@ def test_get_query_response(mocker, settings):
client = ExternalCourseSyncAPIClient()
client.get_query_response(1, start_date, end_date)
mock_post.assert_called_once_with(
"https://test-emeritus-api.io/api/queries/1/results?api_key=test_external_course_sync_api_key",
"https://test-external-course-sync-api.io/api/queries/1/results?api_key=test_external_course_sync_api_key",
data=json.dumps(
{
"parameters": {
Expand Down
8 changes: 4 additions & 4 deletions courses/sync_external_courses/test_data/batch_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"language": "English",
"image_name": "test_emeritus_image.jpg",
"ceu": "2.8",
"landing_page_url": "https://test-emeritus-api.io/Internet-of-things-iot-design-and-applications?utm_medium=EmWebsite&utm_campaign=direct_EmWebsite?utm_campaign=school_website&utm_medium=website&utm_source=MIT-web",
"Apply_now_url": "https://test-emeritus-api.io/?locale=en&program_sfid=01t2s000000OHA2AAO&source=applynowlp&utm_campaign=school&utm_medium=MITWebsite&utm_source=MIT-web",
"landing_page_url": "https://test-external-course-sync-api.io/Internet-of-things-iot-design-and-applications?utm_medium=EmWebsite&utm_campaign=direct_EmWebsite?utm_campaign=school_website&utm_medium=website&utm_source=MIT-web",
"Apply_now_url": "https://test-external-course-sync-api.io/?locale=en&program_sfid=01t2s000000OHA2AAO&source=applynowlp&utm_campaign=school&utm_medium=MITWebsite&utm_source=MIT-web",
"description": "By 2030, McKinsey Digital research estimates that it could enable USD 5.5 trillion to USD 12.6 trillion in value globally, including the value captured by consumers and customers of Internet of Things ( IoT) products and services. This future dominated by IoT requires a paradigm shift in the way products and services are designed. MIT xPRO’s Internet of Things (IoT): Design and Applications program is designed to provide you with a strategic road map for creating user-centered, future-ready, differentiated products that drive business growth. Through activities, assignments, and industry examples, you will learn the fundamental principles of developing IoT-centric products and services.\r",
"learning_outcomes": "This program will enable you to:\r\n● Understand how IoT mindsets are contributing to a global shift in product and business strategy\r\n● Discover how IoT impacts the design of both products and businesses\r\n● Identify hardware, software, and data technologies that support IoT adoption\r\n● Explore examples of successful IoT product and business strategies\r\n● Examine legal, ethical, privacy, and security concerns related to IoT",
"program_for": "The program is ideal for:\r\n● Managers and functional leaders looking to learn the strategies for successfully leveraging IoT principles to drive business value\r\n● Product managers and designers who want to shift to an IoT-centric mindset to develop innovative products and services\r\n● Technology professionals keen on understanding the fundamental principles associated with the implementation of IoT and its wide array of applications\r\nNote: This is a nontechnical program for which there are no prerequisites.\r"
Expand Down Expand Up @@ -183,8 +183,8 @@
"language": "English",
"image_name": "test_emeritus_image.jpg",
"ceu": "0.8",
"landing_page_url": "https://test-emeritus-api.io/professional-certificate-cybersecurity?utm_campaign=school_website&utm_medium=website&utm_source=MIT-web",
"Apply_now_url": "https://test-emeritus-api.io/?locale=en&program_sfid=01t2s000000ZdQKAA0&source=applynowlp&utm_campaign=school&utm_medium=MITWebsite&utm_source=MIT-web",
"landing_page_url": "https://test-external-course-sync-api.io/professional-certificate-cybersecurity?utm_campaign=school_website&utm_medium=website&utm_source=MIT-web",
"Apply_now_url": "https://test-external-course-sync-api.io/?locale=en&program_sfid=01t2s000000ZdQKAA0&source=applynowlp&utm_campaign=school&utm_medium=MITWebsite&utm_source=MIT-web",
"description": "Cyberattacks are becoming more frequent, complex, and targeted, collectively costing organizations billions of dollars annually. It’s no wonder that cybersecurity is one of the fastest growing industries; by 2027, Forbes projects the value of the cybersecurity market to reach USD 403 billion. More and more companies and government agencies are seeking to hire cybersecurity professionals with the specialized technical skills needed to defend mission-critical computer systems, networks, and cloud applications against cyberattacks. If you’re keen to step into this high-growth field and advance your career, the MIT xPRO Professional Certificate in Cybersecurity is for you.\r",
"learning_outcomes": "This program will enable you to:\r\n● Gain an overview of cybersecurity risk management, including its foundational concepts and relevant regulations\r\n● Explore the domains covering various aspects of cloud technology\r\n● Learn adversary tactics and techniques that are utilized as the foundational development of specific threat models and methodologies\r\n● Understand the guidelines for organizations to prepare themselves against cybersecurity attacks",
"program_for": "The program is ideal for:\r\n● Early-career IT professionals, network engineers, and system administrators wanting to gain a comprehensive overview of cybersecurity and fast-track their career progression\r\n● IT project managers and engineers keen on gaining the ability to think critically about the threat landscape, including vulnerabilities in cybersecurity, and upgrading their resume for career advancement\r\n● Mid- or later-career professionals seeking a career change and looking to add critical cybersecurity knowledge and foundational lessons to their resume"
Expand Down

0 comments on commit 02bbfb2

Please sign in to comment.