Skip to content

Commit

Permalink
Adds a test for not yet implemented target types
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Feb 6, 2015
1 parent a1e2694 commit 049a5bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libres/tests/test_reservation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

from datetime import datetime, timedelta
from libres.db.models import Reservation
from libres.modules.calendar import standardize_date
Expand All @@ -7,6 +9,11 @@ def test_reservation_title():
assert Reservation(email='test@example.org').title == 'test@example.org'


def test_unknown_target_type():
with pytest.raises(NotImplementedError):
Reservation(target_type='foo').timespans()


def test_reservation_timespans(scheduler):
start = datetime(2015, 2, 5, 15)
end = datetime(2015, 2, 5, 16)
Expand Down

0 comments on commit 049a5bf

Please sign in to comment.