Merge "Raise NotImplementedError instead of NotImplemented"

This commit is contained in:
Jenkins 2014-08-28 18:26:29 +00:00 committed by Gerrit Code Review
commit c4b26aad3a
2 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class BasePollingManager(object):
self._polling_completed = True
def _is_polling_required(self):
raise NotImplemented
raise NotImplementedError()
@property
def is_polling_required(self):

View File

@ -43,6 +43,9 @@ class TestBasePollingManager(base.BaseTestCase):
super(TestBasePollingManager, self).setUp()
self.pm = polling.BasePollingManager()
def test__is_polling_required_should_not_be_implemented(self):
self.assertRaises(NotImplementedError, self.pm._is_polling_required)
def test_force_polling_sets_interval_attribute(self):
self.assertFalse(self.pm._force_polling)
self.pm.force_polling()