Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 6f0d87b

Browse files
committed
fix test after last fix
1 parent dec30d0 commit 6f0d87b

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

tests/test_listing.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -294,32 +294,32 @@ def test_container(self):
294294
label, command = self.base[0]
295295

296296
self.assertEqual(label, "test label")
297-
self.assertEqual(command, "XBMC.Container.Update(plugin://script.module.codequick/"
298-
"tests/test_listing/test_callback)")
297+
self.assertEqual("XBMC.Container.Update(plugin://script.module.codequick/tests/test_listing/test_callback/)",
298+
command)
299299

300300
def test_container_with_params(self):
301301
self.base.container(self.test_callback, "test label", True, url="tester")
302302
label, command = self.base[0]
303303

304304
self.assertEqual(label, "test label")
305305
self.assertTrue(command.startswith("XBMC.Container.Update(plugin://script.module.codequick/"
306-
"tests/test_listing/test_callback?_pickle_="))
306+
"tests/test_listing/test_callback/?_pickle_="))
307307

308308
def test_script(self):
309309
self.base.script(self.test_callback, "test label")
310310
label, command = self.base[0]
311311

312312
self.assertEqual(label, "test label")
313-
self.assertEqual(command, "XBMC.RunPlugin(plugin://script.module.codequick/"
314-
"tests/test_listing/test_callback)")
313+
self.assertEqual("XBMC.RunPlugin(plugin://script.module.codequick/tests/test_listing/test_callback/)",
314+
command)
315315

316316
def test_script_with_params(self):
317317
self.base.script(self.test_callback, "test label", True, url="tester")
318318
label, command = self.base[0]
319319

320320
self.assertEqual(label, "test label")
321321
self.assertTrue(command.startswith("XBMC.RunPlugin(plugin://script.module.codequick/"
322-
"tests/test_listing/test_callback?_pickle_="))
322+
"tests/test_listing/test_callback/?_pickle_="))
323323

324324
@unittest.skipIf(PY3, "only work under python 2")
325325
def test_related_py2(self):
@@ -328,7 +328,7 @@ def test_related_py2(self):
328328

329329
self.assertEqual(label, "Related Videos")
330330
self.assertEqual(command, "XBMC.Container.Update(plugin://script.module.codequick/tests/test_listing/"
331-
"test_callback?_pickle_=80027d710155075f7469746c655f7102580e00000052656c617"
331+
"test_callback/?_pickle_=80027d710155075f7469746c655f7102580e00000052656c617"
332332
"4656420566964656f737103732e)")
333333

334334
@unittest.skipUnless(PY3, "only work under python 3")
@@ -338,7 +338,7 @@ def test_related_py3(self):
338338

339339
self.assertEqual(label, "Related Videos")
340340
self.assertEqual(command, "XBMC.Container.Update(plugin://script.module.codequick/tests/test_listing/"
341-
"test_callback?_pickle_=8004951f000000000000007d948c075f746974"
341+
"test_callback/?_pickle_=8004951f000000000000007d948c075f746974"
342342
"6c655f948c0e52656c6174656420566964656f7394732e)")
343343

344344
def test_related_with_params(self):
@@ -347,7 +347,7 @@ def test_related_with_params(self):
347347

348348
self.assertEqual(label, "Related Videos")
349349
self.assertTrue(command.startswith("XBMC.Container.Update(plugin://script.module.codequick/"
350-
"tests/test_listing/test_callback?_pickle_="))
350+
"tests/test_listing/test_callback/?_pickle_="))
351351

352352
def test_close(self):
353353
self.base.related(self.test_callback)
@@ -406,7 +406,7 @@ def test_callback_args(self):
406406
def test_close_route(self):
407407
self.listitem.set_callback(self.route_callback)
408408
path, raw_listitem, isfolder = self.listitem._close()
409-
self.assertEqual(path, "plugin://script.module.codequick/tests/test_listing/route_callback")
409+
self.assertEqual("plugin://script.module.codequick/tests/test_listing/route_callback/", path)
410410
self.assertTrue(isfolder)
411411

412412
def test_close_no_callback(self):
@@ -417,13 +417,13 @@ def test_close_no_callback(self):
417417
def test_close_route_params(self):
418418
self.listitem.set_callback(self.route_callback, "yes", full=True)
419419
path, raw_listitem, isfolder = self.listitem._close()
420-
self.assertTrue(path.startswith("plugin://script.module.codequick/tests/test_listing/route_callback?_pickle_="))
420+
self.assertTrue(path.startswith("plugin://script.module.codequick/tests/test_listing/route_callback/?_pickle_="))
421421
self.assertTrue(isfolder)
422422

423423
def test_close_resolver(self):
424424
self.listitem.set_callback(self.resolver_callback)
425425
path, raw_listitem, isfolder = self.listitem._close()
426-
self.assertEqual(path, "plugin://script.module.codequick/tests/test_listing/resolver_callback")
426+
self.assertEqual("plugin://script.module.codequick/tests/test_listing/resolver_callback/", path)
427427
self.assertFalse(isfolder)
428428

429429
def test_close_url(self):

tests/test_support.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,22 +258,22 @@ def tearDown(self):
258258

259259
def test_build_path_no_args(self):
260260
ret = support.build_path()
261-
self.assertEqual(ret, "plugin://script.module.codequick/root")
261+
self.assertEqual(ret, "plugin://script.module.codequick/root/")
262262

263263
def test_build_new_path(self):
264264
ret = support.build_path(self.callback)
265-
self.assertEqual(ret, "plugin://script.module.codequick/root")
265+
self.assertEqual(ret, "plugin://script.module.codequick/root/")
266266

267267
@unittest.skipIf(PY3, "The pickled string is specific to python 2")
268268
def test_build_path_new_args_py2(self):
269269
ret = support.build_path(self.callback, query={"testdata": "data"})
270-
self.assertEqual("plugin://script.module.codequick/root?_pickle_="
270+
self.assertEqual("plugin://script.module.codequick/root/?_pickle_="
271271
"80027d71015508746573746461746171025504646174617103732e", ret)
272272

273273
@unittest.skipUnless(PY3, "The pickled string is specific to python 2")
274274
def test_build_path_new_args_py3(self):
275275
ret = support.build_path(self.callback, query={"testdata": "data"})
276-
self.assertEqual("plugin://script.module.codequick/root?_pickle_="
276+
self.assertEqual("plugin://script.module.codequick/root/?_pickle_="
277277
"80049516000000000000007d948c08746573746461746194"
278278
"8c046461746194732e", ret)
279279

@@ -282,7 +282,7 @@ def test_build_path_extra_args_py2(self):
282282
support.dispatcher.params["_title_"] = "video"
283283
try:
284284
ret = support.build_path(self.callback, testdata="data")
285-
self.assertEqual("plugin://script.module.codequick/root?_pickle_="
285+
self.assertEqual("plugin://script.module.codequick/root/?_pickle_="
286286
"80027d71012855075f7469746c655f71025505766964656"
287287
"f71035508746573746461746171045504646174617105752e", ret)
288288
finally:
@@ -293,7 +293,7 @@ def test_build_path_extra_args_py3(self):
293293
support.dispatcher.params["_title_"] = "video"
294294
try:
295295
ret = support.build_path(self.callback, testdata="data")
296-
self.assertEqual("plugin://script.module.codequick/root?_pickle_="
296+
self.assertEqual("plugin://script.module.codequick/root/?_pickle_="
297297
"80049529000000000000007d94288c075f7469746c655f94"
298298
"8c05766964656f948c087465737464617461948c046461746194752e", ret)
299299
finally:

0 commit comments

Comments
 (0)