Added admin interface to manage channels and enabled plugins (#9)
* Added base admin login/logout flows * Ignore local database * Channel model * Admin interface for channels and plugins * Added database tests along with workflows * Added some docstrings * Ignore .coverage file * Creating plugins docs WIP * Documentation * Black everything * Some documentation * Coverage for the plugins package as well * DB Fixes * Absolute FROM in Dockerfile * Database and logging fixes * Slack: Support private channels * Added pre-commit * black'd * Fixed UserQuery.create * Fixed ChannelPluginQuery.create exists call * Added ChannelPlugin menu for debugging * Ignore sqlite databases * Updated contributing docs
This commit is contained in:
parent
456d144a7d
commit
57b413dd1b
45 changed files with 2210 additions and 421 deletions
18
tests/test_objects.py
Normal file
18
tests/test_objects.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
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