Update tests

This commit is contained in:
mathieui 2016-06-12 16:56:18 +02:00
parent ed5f7b18bd
commit 2994a8e1e9
2 changed files with 6 additions and 4 deletions

View file

@ -10,9 +10,11 @@ import pytest
import datetime import datetime
from slixmpp import JID from slixmpp import JID
from datetime import timedelta from datetime import timedelta
from common import (datetime_tuple, get_utc_time, get_local_time, shell_split, from common import (_datetime_tuple as datetime_tuple, get_utc_time,
find_argument_quoted, find_argument_unquoted, get_local_time, shell_split, _find_argument_quoted
parse_str_to_secs, parse_secs_to_str, safeJID) as find_argument_quoted, _find_argument_unquoted as
find_argument_unquoted, parse_str_to_secs,
parse_secs_to_str, safeJID)
def test_utc_time(): def test_utc_time():
delta = timedelta(seconds=-3600) delta = timedelta(seconds=-3600)

View file

@ -10,7 +10,7 @@ from theming import dump_tuple, read_tuple
def test_read_tuple(): def test_read_tuple():
assert read_tuple('1,-1,u') == ((1, -1), 'u') assert read_tuple('1,-1,u') == ((1, -1), 'u')
assert read_tuple('1,2') == ((1, 2), None) assert read_tuple('1,2') == ((1, 2), '\0')
with pytest.raises(IndexError): with pytest.raises(IndexError):
read_tuple('1') read_tuple('1')