mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
seperate wrong implementations into own cases
This commit is contained in:
parent
0d9f76a019
commit
2413119cc1
@ -67,25 +67,13 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
|
||||
self._notification_run()
|
||||
|
||||
|
||||
class ClassNotificationTests(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()
|
||||
class BulkNotificationMethodTests(BaseNotificationIntegrationTest):
|
||||
|
||||
def test_BulkNotificationMethod(self):
|
||||
"""ensure the implementation requirements are tested"""
|
||||
|
||||
class WrongImplementation(BulkNotificationMethod):
|
||||
METHOD_NAME = 'WrongImplementation2'
|
||||
METHOD_NAME = 'WrongImplementationBulk'
|
||||
|
||||
def get_targets(self):
|
||||
return [1, ]
|
||||
@ -94,4 +82,18 @@ class ClassNotificationTests(BaseNotificationIntegrationTest):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user