Skip to content
Snippets Groups Projects
Unverified Commit 45e77457 authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #21357 from edx/feanil/fix_reload_error

reload is not a system built-in in python 3.
parents c9939889 46b730a9
No related merge requests found
......@@ -7,6 +7,7 @@ from __future__ import absolute_import
import json
import sys
import six
from django.conf import settings
from django.test import TestCase
from django.urls import clear_url_caches, resolve
......@@ -14,6 +15,9 @@ from mock import patch
from util.db import CommitOnSuccessManager, OuterAtomic
if six.PY3:
from importlib import reload # pylint: disable=no-name-in-module,redefined-builtin
class UrlResetMixin(object):
"""Mixin to reset urls.py before and after a test
......@@ -86,13 +90,13 @@ class EventTestMixin(object):
"""
Ensures no events were emitted since the last event related assertion.
"""
self.assertFalse(self.mock_tracker.emit.called) # pylint: disable=maybe-no-member
self.assertFalse(self.mock_tracker.emit.called)
def assert_event_emitted(self, event_name, **kwargs):
"""
Verify that an event was emitted with the given parameters.
"""
self.mock_tracker.emit.assert_any_call( # pylint: disable=maybe-no-member
self.mock_tracker.emit.assert_any_call(
event_name,
kwargs
)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment