Skip to content

Commit fabe3a5

Browse files
authored
Merge branch 'master' into master
2 parents 7b61f93 + 5a20586 commit fabe3a5

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ language: python
22
python:
33
- '2.6'
44
- '2.7'
5-
- '3.2'
65
- '3.3'
76
- '3.4'
87
- '3.5'
8+
- '3.6'
99
install:
1010
- pip install -r test_requirements.txt
1111
- pip install -r requirements.txt

opentok/opentok.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def session_url(self):
292292

293293
def archive_url(self, archive_id=None):
294294
"""For internal use."""
295-
url = self.api_url + '/v2/partner/' + self.api_key + '/archive'
295+
url = self.api_url + '/v2/project/' + self.api_key + '/archive'
296296
if archive_id:
297297
url = url + '/' + archive_id
298298
return url

tests/test_archive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_stop_archive(self):
3535
u('outputMode'): OutputModes.composed.value,
3636
u('url'): None,
3737
})
38-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive/{1}/stop').format(self.api_key, archive_id),
38+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive/{1}/stop').format(self.api_key, archive_id),
3939
body=textwrap.dedent(u("""\
4040
{
4141
"createdAt" : 1395183243556,
@@ -96,7 +96,7 @@ def test_delete_archive(self):
9696
u('outputMode'): OutputModes.composed.value,
9797
u('url'): None,
9898
})
99-
httpretty.register_uri(httpretty.DELETE, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
99+
httpretty.register_uri(httpretty.DELETE, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
100100
body=u(''),
101101
status=204)
102102

tests/test_archive_api.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setUp(self):
2020

2121
@httpretty.activate
2222
def test_start_archive(self):
23-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
23+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
2424
body=textwrap.dedent(u("""\
2525
{
2626
"createdAt" : 1395183243556,
@@ -71,7 +71,7 @@ def test_start_archive(self):
7171

7272
@httpretty.activate
7373
def test_start_archive_with_name(self):
74-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
74+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
7575
body=textwrap.dedent(u("""\
7676
{
7777
"createdAt" : 1395183243556,
@@ -120,7 +120,7 @@ def test_start_archive_with_name(self):
120120

121121
@httpretty.activate
122122
def test_start_voice_archive(self):
123-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
123+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
124124
body=textwrap.dedent(u("""\
125125
{
126126
"createdAt" : 1395183243556,
@@ -171,7 +171,7 @@ def test_start_voice_archive(self):
171171

172172
@httpretty.activate
173173
def test_start_individual_archive(self):
174-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
174+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
175175
body=textwrap.dedent(u("""\
176176
{
177177
"createdAt" : 1395183243556,
@@ -223,7 +223,7 @@ def test_start_individual_archive(self):
223223

224224
@httpretty.activate
225225
def test_start_composed_archive(self):
226-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
226+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
227227
body=textwrap.dedent(u("""\
228228
{
229229
"createdAt" : 1395183243556,
@@ -276,7 +276,7 @@ def test_start_composed_archive(self):
276276
@httpretty.activate
277277
def test_stop_archive(self):
278278
archive_id = u('30b3ebf1-ba36-4f5b-8def-6f70d9986fe9')
279-
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/partner/{0}/archive/{1}/stop').format(self.api_key, archive_id),
279+
httpretty.register_uri(httpretty.POST, u('https://api.opentok.com/v2/project/{0}/archive/{1}/stop').format(self.api_key, archive_id),
280280
body=textwrap.dedent(u("""\
281281
{
282282
"createdAt" : 1395183243000,
@@ -319,7 +319,7 @@ def test_stop_archive(self):
319319
@httpretty.activate
320320
def test_delete_archive(self):
321321
archive_id = u('30b3ebf1-ba36-4f5b-8def-6f70d9986fe9')
322-
httpretty.register_uri(httpretty.DELETE, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
322+
httpretty.register_uri(httpretty.DELETE, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
323323
body=u(''),
324324
status=204)
325325

@@ -332,7 +332,7 @@ def test_delete_archive(self):
332332
@httpretty.activate
333333
def test_find_archive(self):
334334
archive_id = u('f6e7ee58-d6cf-4a59-896b-6d56b158ec71')
335-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
335+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
336336
body=textwrap.dedent(u("""\
337337
{
338338
"createdAt" : 1395187836000,
@@ -374,7 +374,7 @@ def test_find_archive(self):
374374

375375
@httpretty.activate
376376
def test_find_archives(self):
377-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
377+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
378378
body=textwrap.dedent(u("""\
379379
{
380380
"count" : 6,
@@ -479,7 +479,7 @@ def test_find_archives(self):
479479

480480
@httpretty.activate
481481
def test_find_archives_with_offset(self):
482-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
482+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
483483
body=textwrap.dedent(u("""\
484484
{
485485
"count" : 6,
@@ -542,7 +542,7 @@ def test_find_archives_with_offset(self):
542542

543543
@httpretty.activate
544544
def test_find_archives_with_count(self):
545-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
545+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
546546
body=textwrap.dedent(u("""\
547547
{
548548
"count" : 6,
@@ -592,7 +592,7 @@ def test_find_archives_with_count(self):
592592

593593
@httpretty.activate
594594
def test_find_archives_with_offset_and_count(self):
595-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive').format(self.api_key),
595+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive').format(self.api_key),
596596
body=textwrap.dedent(u("""\
597597
{
598598
"count" : 6,
@@ -670,7 +670,7 @@ def test_find_archives_with_offset_and_count(self):
670670
@httpretty.activate
671671
def test_find_paused_archive(self):
672672
archive_id = u('f6e7ee58-d6cf-4a59-896b-6d56b158ec71')
673-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
673+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
674674
body=textwrap.dedent(u("""\
675675
{
676676
"createdAt" : 1395187836000,
@@ -697,7 +697,7 @@ def test_find_paused_archive(self):
697697
@httpretty.activate
698698
def test_find_expired_archive(self):
699699
archive_id = u('f6e7ee58-d6cf-4a59-896b-6d56b158ec71')
700-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
700+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
701701
body=textwrap.dedent(u("""\
702702
{
703703
"createdAt" : 1395187836000,
@@ -724,7 +724,7 @@ def test_find_expired_archive(self):
724724
@httpretty.activate
725725
def test_find_archive_with_unknown_properties(self):
726726
archive_id = u('f6e7ee58-d6cf-4a59-896b-6d56b158ec71')
727-
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/partner/{0}/archive/{1}').format(self.api_key, archive_id),
727+
httpretty.register_uri(httpretty.GET, u('https://api.opentok.com/v2/project/{0}/archive/{1}').format(self.api_key, archive_id),
728728
body=textwrap.dedent(u("""\
729729
{
730730
"createdAt" : 1395187836000,

0 commit comments

Comments
 (0)