Skip to content

Commit 50ea4fe

Browse files
committed
completes testing of archiving api
1 parent b3fc86f commit 50ea4fe

File tree

3 files changed

+404
-5
lines changed

3 files changed

+404
-5
lines changed

opentok/archives.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
if PY3:
66
from datetime import timezone
77

8+
# compat
9+
from six.moves import map
10+
811
dthandler = lambda obj: obj.isoformat() if isinstance(obj, datetime) or isinstance(obj, date) else None
912

1013
class Archive(object):
@@ -40,7 +43,7 @@ class ArchiveList(object):
4043

4144
def __init__(self, values):
4245
self.count = values.get('count')
43-
self.items = map(lambda x: OpenTokArchive(self, x), values.get('items', []))
46+
self.items = map(lambda x: Archive(self, x), values.get('items', []))
4447

4548
def __iter__(self):
4649
for x in self.items:
@@ -49,7 +52,7 @@ def __iter__(self):
4952
def attrs(self):
5053
return {
5154
'count': self.count,
52-
'items': map(OpenTokArchive.attrs, self.items)
55+
'items': map(Archive.attrs, self.items)
5356
}
5457

5558
def json(self):

opentok/opentok.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import xml.dom.minidom as xmldom # create_session
1212

1313
# compat
14-
from six.moves import map
1514
from six.moves.urllib.parse import urlencode
1615
from six import text_type, u, b, PY3
1716
from enum import Enum

0 commit comments

Comments
 (0)