seperate wrong implementations into own cases

This commit is contained in:
Matthias 2021-12-04 18:42:08 +01:00
parent 0d9f76a019
commit 2413119cc1
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -67,25 +67,13 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
self._notification_run() self._notification_run()
class ClassNotificationTests(BaseNotificationIntegrationTest): class BulkNotificationMethodTests(BaseNotificationIntegrationTest):
def test_SingleNotificationMethod(self):
"""ensure the implementation requirements are tested"""
class WrongImplementation(SingleNotificationMethod):
METHOD_NAME = 'WrongImplementation1'
def get_targets(self):
return [1, ]
with self.assertRaises(NotImplementedError):
self._notification_run()
def test_BulkNotificationMethod(self): def test_BulkNotificationMethod(self):
"""ensure the implementation requirements are tested""" """ensure the implementation requirements are tested"""
class WrongImplementation(BulkNotificationMethod): class WrongImplementation(BulkNotificationMethod):
METHOD_NAME = 'WrongImplementation2' METHOD_NAME = 'WrongImplementationBulk'
def get_targets(self): def get_targets(self):
return [1, ] return [1, ]
@ -94,4 +82,18 @@ class ClassNotificationTests(BaseNotificationIntegrationTest):
self._notification_run() self._notification_run()
class SingleNotificationMethodTests(BaseNotificationIntegrationTest):
def test_SingleNotificationMethod(self):
"""ensure the implementation requirements are tested"""
class WrongImplementation(SingleNotificationMethod):
METHOD_NAME = 'WrongImplementationSingle'
def get_targets(self):
return [1, ]
with self.assertRaises(NotImplementedError):
self._notification_run()
# A integration test for notifications is provided in test_part.PartNotificationTest # A integration test for notifications is provided in test_part.PartNotificationTest