Some documentation
This commit is contained in:
parent
c8c5fefabc
commit
49a9fccbf3
4 changed files with 70 additions and 24 deletions
16
tests/test_objects.py
Normal file
16
tests/test_objects.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from butterrobot.objects import Channel, ChannelPlugin
|
||||
|
||||
|
||||
def test_channel_has_enabled_plugin_ok():
|
||||
channel = Channel(
|
||||
platform="debug",
|
||||
platform_channel_id="debug",
|
||||
channel_raw={},
|
||||
plugins={
|
||||
"enabled": ChannelPlugin(id=1, channel_id="test", plugin_id="enabled", enabled=True),
|
||||
"existant": ChannelPlugin(id=2, channel_id="test", plugin_id="existant"),
|
||||
}
|
||||
)
|
||||
assert not channel.has_enabled_plugin("non.existant")
|
||||
assert not channel.has_enabled_plugin("existant")
|
||||
assert channel.has_enabled_plugin("enabled")
|
Loading…
Add table
Add a link
Reference in a new issue