summaryrefslogtreecommitdiff
path: root/tests/test_functional/test_generation.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_functional/test_generation.py')
-rw-r--r--tests/test_functional/test_generation.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_functional/test_generation.py b/tests/test_functional/test_generation.py
index 9bff54a..6c40df1 100644
--- a/tests/test_functional/test_generation.py
+++ b/tests/test_functional/test_generation.py
@@ -631,9 +631,13 @@ class TestGeneration(unittest.TestCase):
m = Mapper(explicit=True)
m.minimization=minimization
m.connect('/songs/{title}{.format}')
+ m.connect('/stories/{slug}{.format:pdf}')
eq_('/songs/my-way', m.generate(title='my-way'))
eq_('/songs/my-way.mp3', m.generate(title='my-way', format='mp3'))
+ eq_('/stories/frist-post', m.generate(slug='frist-post'))
+ eq_('/stories/frist-post.pdf', m.generate(slug='frist-post', format='pdf'))
+ eq_(None, m.generate(slug='frist-post', format='doc'))
if __name__ == '__main__':
unittest.main()