Coverage for src/backend/InvenTree/plugin/broken/bad_actor.py: 0%

10 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 17:47 +0000

1"""Attempt to create a bad actor plugin that overrides internal methods.""" 

2 

3from plugin import InvenTreePlugin 

4 

5 

6class BadActorPlugin(InvenTreePlugin): 

7 """A plugin that attempts to override internal methods.""" 

8 

9 SLUG = 'bad_actor' 

10 

11 def __init__(self, *args, **kwargs): 

12 """Initialize the plugin.""" 

13 super().__init__(*args, **kwargs) 

14 self.add_mixin('settings', 'has_settings', __class__) 

15 

16 def plugin_slug(self) -> str: 

17 """Return the slug of this plugin.""" 

18 return 'bad_actor' 

19 

20 def plugin_name(self) -> str: 

21 """Return the name of this plugin.""" 

22 return 'Bad Actor Plugin'