Skip to content

Commit

Permalink
Moved test_apple_xlocation() to test_icalendar.py
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Apr 18, 2017
1 parent d0fd108 commit 124b328
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
20 changes: 0 additions & 20 deletions src/icalendar/tests/apple_xlocation_test.py

This file was deleted.

17 changes: 16 additions & 1 deletion src/icalendar/tests/test_icalendar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import textwrap
import icalendar
import os

from icalendar.tests import unittest

Expand Down Expand Up @@ -281,3 +282,17 @@ def test_q_join(self):
from ..parser import q_join
self.assertEqual(q_join(['Max', 'Moller', 'Rasmussen, Max']),
'Max,Moller,"Rasmussen, Max"')


class TestEncoding(unittest.TestCase):

def test_apple_xlocation(self):
"""
Test if we support base64 encoded binary data in parameter values.
"""
directory = os.path.dirname(__file__)
with open(os.path.join(directory, 'x_location.ics'), 'rb') as fp:
data = fp.read()
cal = icalendar.Calendar.from_ical(data)
for event in cal.walk('vevent'):
self.assertEqual(len(event.errors), 0, 'Got too many errors')

0 comments on commit 124b328

Please sign in to comment.