forked from codefornl/helpradar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from unittest import TestCase | ||
|
||
from platformen.helpers import format_group, format_organizer | ||
|
||
|
||
class TestHelpers(TestCase): | ||
def test_format_group_demand(self): | ||
assert format_group('Hulpvraag van klaas') == 'demand' | ||
|
||
def test_format_group_supply(self): | ||
assert format_group('Iets anders') == 'supply' | ||
|
||
def test_format_organizer_none(self): | ||
assert format_organizer(None) is None | ||
|
||
def test_format_organizer_empty(self): | ||
assert format_organizer('') == '' | ||
|
||
def test_format_organizer_simple(self): | ||
assert format_organizer('blub') == 'blub' | ||
|
||
def test_format_organizer_composed(self): | ||
assert format_organizer('tic/tac/toe') == 'toe' | ||
|
||
def test_format_organizer_dash(self): | ||
assert format_organizer('eerste-deel') == 'eerste' | ||
|
||
def test_format_organizer_space(self): | ||
assert format_organizer('eerste deel') == 'eerste' |