From 74307e45e8a4ace84de0747a20e76dbec82dfb52 Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Thu, 26 Oct 2017 09:14:57 -0400 Subject: [PATCH] Remove query constants from schedules management command test subclasses --- .../tests/test_send_recurring_nudge.py | 13 ------------ .../tests/test_send_upgrade_reminder.py | 20 ------------------- 2 files changed, 33 deletions(-) diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py index 8c9f5e1f35..9f080f6e1f 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py @@ -25,19 +25,6 @@ from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_un from student.tests.factories import UserFactory -# 1) Load the current django site -# 2) Query the schedules to find all of the template context information -NUM_QUERIES_NO_MATCHING_SCHEDULES = 2 - -# 3) Query all course modes for all courses in returned schedules -NUM_QUERIES_WITH_MATCHES = NUM_QUERIES_NO_MATCHING_SCHEDULES + 1 - -# 4) Load the non-matching site configurations -NUM_QUERIES_NO_ORG_LIST = 1 - -NUM_COURSE_MODES_QUERIES = 1 - - @ddt.ddt @skip_unless_lms @skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS, diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py index 1ae9e64647..2ff4f59cf4 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py @@ -23,26 +23,6 @@ from openedx.core.djangolib.testing.utils import skip_unless_lms from student.tests.factories import UserFactory -SITE_QUERY = 1 -SCHEDULES_QUERY = 1 -COURSE_MODES_QUERY = 1 -GLOBAL_DEADLINE_SWITCH_QUERY = 1 -COMMERCE_CONFIG_QUERY = 1 -NUM_QUERIES_NO_ORG_LIST = 1 - -NUM_QUERIES_NO_MATCHING_SCHEDULES = SITE_QUERY + SCHEDULES_QUERY - -NUM_QUERIES_WITH_MATCHES = ( - NUM_QUERIES_NO_MATCHING_SCHEDULES + - COURSE_MODES_QUERY -) - -NUM_QUERIES_FIRST_MATCH = ( - NUM_QUERIES_WITH_MATCHES - + GLOBAL_DEADLINE_SWITCH_QUERY - + COMMERCE_CONFIG_QUERY -) - LOG = logging.getLogger(__name__)