Skip to content

Commit

Permalink
Tests: Add test to ensure po2ical requires a template
Browse files Browse the repository at this point in the history
  • Loading branch information
unho committed Sep 7, 2017
1 parent f0c2aea commit 4f04906
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions translate/convert/test_po2ical.py
Expand Up @@ -2,6 +2,8 @@

from __future__ import unicode_literals

import pytest

from translate.convert import po2ical, test_convert
from translate.misc import wStringIO

Expand Down Expand Up @@ -174,6 +176,16 @@ def test_convert_include_fuzzy(self):
template_source,
include_fuzzy=True)

def test_no_template(self):
"""Check that a template is required."""
input_source = """
#: [uid1@example.com]SUMMARY
msgid "Value"
msgstr "Waarde"
"""
with pytest.raises(ValueError):
self.format2po_text(input_source)


class TestPO2IcalCommand(test_convert.TestConvertCommand, TestPO2Ical):
"""Tests running actual po2ical commands on files"""
Expand Down

0 comments on commit 4f04906

Please sign in to comment.