Merge pull request #6998 from stvstnfrd/quality/pep8
Extend PEP8 coverage
This commit is contained in:
@@ -225,7 +225,6 @@ class TestCohorts(ModuleStoreTestCase):
|
||||
# get_cohort should return a group for user
|
||||
self.assertEquals(cohorts.get_cohort(user, course.id).name, "AutoGroup")
|
||||
|
||||
|
||||
def test_auto_cohorting(self):
|
||||
"""
|
||||
Make sure cohorts.get_cohort() does the right thing with auto_cohort_groups
|
||||
|
||||
@@ -13,23 +13,19 @@ from student.models import UserProfile
|
||||
|
||||
TEST_PASSWORD = "test"
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
|
||||
class TestAccountAPI(APITestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestAccountAPI, self).setUp()
|
||||
|
||||
self.anonymous_client = APIClient()
|
||||
|
||||
self.different_user = UserFactory.create(password=TEST_PASSWORD)
|
||||
self.different_client = APIClient()
|
||||
|
||||
self.staff_user = UserFactory(is_staff=True, password=TEST_PASSWORD)
|
||||
self.staff_client = APIClient()
|
||||
|
||||
self.user = UserFactory.create(password=TEST_PASSWORD)
|
||||
|
||||
self.url = reverse("accounts_api", kwargs={'username': self.user.username})
|
||||
|
||||
def test_get_account_anonymous_user(self):
|
||||
|
||||
@@ -157,4 +157,4 @@ class AccountView(APIView):
|
||||
}
|
||||
|
||||
validation_errors['field_errors'] = field_errors
|
||||
return validation_errors
|
||||
return validation_errors
|
||||
|
||||
@@ -1599,4 +1599,3 @@ class UpdateEmailOptInTestCase(ApiTestCase, ModuleStoreTestCase):
|
||||
self.assertHttpBadRequest(response)
|
||||
with self.assertRaises(UserOrgTag.DoesNotExist):
|
||||
UserOrgTag.objects.get(user=self.user, org=self.course.id.org, key="email-optin")
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ def dump_memory(signum, frame):
|
||||
"""Dump memory stats for the current process to a temp directory. Uses the meliae output format."""
|
||||
scanner.dump_all_objects('{}/meliae.{}.{}.dump'.format(tempfile.gettempdir(), datetime.now().isoformat(), os.getpid()))
|
||||
|
||||
|
||||
def install_memory_dumper(dump_signal=signal.SIGPROF):
|
||||
"""
|
||||
Install a signal handler on `signal` to dump memory stats for the current process.
|
||||
|
||||
Reference in New Issue
Block a user