Secure send: hand somebody a password without leaving it in a chat window
This commit is contained in:
30
plugins/securesend/tests/test_plugin.py
Normal file
30
plugins/securesend/tests/test_plugin.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Securesend plugin smoke tests.
|
||||
|
||||
Asserts the plugin loads cleanly and satisfies the framework contract.
|
||||
Replace and extend with domain tests as you build the plugin out.
|
||||
"""
|
||||
|
||||
from plugins.securesend.plugin import SecuresendPlugin
|
||||
|
||||
|
||||
def test_securesend_plugin_meta_is_valid():
|
||||
"""SecuresendPlugin.meta returns a PluginMeta with the expected name."""
|
||||
plugin = SecuresendPlugin()
|
||||
assert plugin.meta.name == 'securesend'
|
||||
assert plugin.meta.api_prefix == '/api/securesend'
|
||||
|
||||
|
||||
def test_securesend_plugin_get_blueprint_returns_blueprint():
|
||||
"""get_blueprint returns a Flask Blueprint, not None."""
|
||||
from flask import Blueprint
|
||||
plugin = SecuresendPlugin()
|
||||
assert isinstance(plugin.get_blueprint(), Blueprint)
|
||||
|
||||
|
||||
def test_securesend_plugin_get_models_returns_a_model():
|
||||
"""get_models returns a list with at least one SQLAlchemy model."""
|
||||
plugin = SecuresendPlugin()
|
||||
models = plugin.get_models()
|
||||
assert len(models) >= 1
|
||||
for model in models:
|
||||
assert hasattr(model, '__tablename__')
|
||||
Reference in New Issue
Block a user