Change test to use pytest
This commit is contained in:
parent
e7fec9dd20
commit
be49dda756
1 changed files with 14 additions and 13 deletions
|
@ -1,13 +1,14 @@
|
|||
import pytest
|
||||
|
||||
from notifications.models_interface import Repository
|
||||
from notifications.notificationevent import NotificationEvent
|
||||
|
||||
from test.fixtures import *
|
||||
|
||||
def test_all_notifications(initialized_db):
|
||||
for subc in NotificationEvent.__subclasses__():
|
||||
if subc.event_name() is not None:
|
||||
@pytest.mark.parametrize('event_name', NotificationEvent.event_names())
|
||||
def test_build_notification(event_name, initialized_db):
|
||||
# Create the notification event.
|
||||
found = NotificationEvent.get_event(subc.event_name())
|
||||
found = NotificationEvent.get_event(event_name)
|
||||
sample_data = found.get_sample_data(Repository('foo', 'bar'), {'level': 'low'})
|
||||
|
||||
# Make sure all calls succeed.
|
||||
|
|
Reference in a new issue