2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

More plugin testing (#3052)

* Add a check of a child panel too

* do not cover error catching

* test for implementation error

* Add warning to test for

* Add test for event_sample

* ignore safety switches

* Add a settings flag to enable event testing

* test if not implemented is raises

* raise plugin specific errors

* use plugin specific error

* fix assertation

* add test for mixin

* this point can't be reached

* add tests for locate plugin

* fix assertations

* fix function call

* refert switch

* this is already caught by the internal API

* also cover mixin redirect
This commit is contained in:
Matthias Mair
2022-05-24 01:23:06 +02:00
committed by GitHub
parent a7ef560ee3
commit 1c6e5f0f20
11 changed files with 151 additions and 15 deletions

View File

@ -76,7 +76,7 @@ class BulkNotificationMethodTests(BaseNotificationIntegrationTest):
def test_BulkNotificationMethod(self):
"""
Ensure the implementation requirements are tested.
NotImplementedError needs to raise if the send_bulk() method is not set.
MixinNotImplementedError needs to raise if the send_bulk() method is not set.
"""
class WrongImplementation(BulkNotificationMethod):
@ -94,7 +94,7 @@ class SingleNotificationMethodTests(BaseNotificationIntegrationTest):
def test_SingleNotificationMethod(self):
"""
Ensure the implementation requirements are tested.
NotImplementedError needs to raise if the send() method is not set.
MixinNotImplementedError needs to raise if the send() method is not set.
"""
class WrongImplementation(SingleNotificationMethod):