1
1
import pytest
2
2
from django .urls import path , re_path
3
3
4
- from channels .routing import ChannelNameRouter , ProtocolTypeRouter , URLRouter , reverse
4
+ from channels .routing import ChannelNameRouter , ProtocolTypeRouter , URLRouter
5
5
6
6
7
7
class MockApplication :
@@ -377,7 +377,6 @@ async def test_url_router_nesting_by_include(root_urlconf):
377
377
== 1
378
378
)
379
379
assert django_reverse ("moon" , urlconf = root_urlconf ) == "/moon/"
380
- assert reverse ("moon" ) == "/moon/"
381
380
382
381
assert (
383
382
await outer_router (
@@ -391,7 +390,6 @@ async def test_url_router_nesting_by_include(root_urlconf):
391
390
== 1
392
391
)
393
392
assert django_reverse ("mars" , urlconf = root_urlconf , args = (5 ,)) == "/mars/5/"
394
- assert reverse ("mars" , args = (5 ,)) == "/mars/5/"
395
393
396
394
assert (
397
395
await outer_router (
@@ -412,10 +410,6 @@ async def test_url_router_nesting_by_include(root_urlconf):
412
410
)
413
411
== "/universe/book/channels-guide/page/10/"
414
412
)
415
- assert (
416
- reverse ("universe:book" , kwargs = dict (book = "channels-guide" , page = 10 ))
417
- == "/universe/book/channels-guide/page/10/"
418
- )
419
413
420
414
assert (
421
415
await outer_router (
@@ -432,7 +426,6 @@ async def test_url_router_nesting_by_include(root_urlconf):
432
426
django_reverse ("universe:test" , urlconf = root_urlconf , args = (10 ,))
433
427
== "/universe/test/10/"
434
428
)
435
- assert reverse ("universe:test" , args = (10 ,)) == "/universe/test/10/"
436
429
437
430
assert (
438
431
await outer_router (
@@ -446,7 +439,6 @@ async def test_url_router_nesting_by_include(root_urlconf):
446
439
== 1
447
440
)
448
441
assert django_reverse ("universe:home" , urlconf = root_urlconf ) == "/universe/home/"
449
- assert reverse ("universe:home" ) == "/universe/home/"
450
442
451
443
452
444
@pytest .mark .asyncio
@@ -543,7 +535,6 @@ async def test_url_router_deep_nesting_by_include(root_urlconf):
543
535
== 1
544
536
)
545
537
assert django_reverse ("moon" , urlconf = root_urlconf ) == "/moon/"
546
- assert reverse ("moon" ) == "/moon/"
547
538
548
539
assert (
549
540
await outer_router (
@@ -557,7 +548,6 @@ async def test_url_router_deep_nesting_by_include(root_urlconf):
557
548
== 1
558
549
)
559
550
assert django_reverse ("mars" , urlconf = root_urlconf , args = (5 ,)) == "/mars/5/"
560
- assert reverse ("mars" , args = (5 ,)) == "/mars/5/"
561
551
562
552
assert (
563
553
await outer_router (
@@ -578,10 +568,6 @@ async def test_url_router_deep_nesting_by_include(root_urlconf):
578
568
)
579
569
== "/universe/earth/book/channels-guide/page/10/"
580
570
)
581
- assert (
582
- reverse ("universe:earth:book" , kwargs = dict (book = "channels-guide" , page = 10 ))
583
- == "/universe/earth/book/channels-guide/page/10/"
584
- )
585
571
586
572
assert (
587
573
await outer_router (
@@ -598,7 +584,6 @@ async def test_url_router_deep_nesting_by_include(root_urlconf):
598
584
django_reverse ("universe:earth:test" , urlconf = root_urlconf , args = (10 ,))
599
585
== "/universe/earth/test/10/"
600
586
)
601
- assert reverse ("universe:earth:test" , args = (10 ,)) == "/universe/earth/test/10/"
602
587
603
588
assert (
604
589
await outer_router (
@@ -615,4 +600,3 @@ async def test_url_router_deep_nesting_by_include(root_urlconf):
615
600
django_reverse ("universe:earth:home" , urlconf = root_urlconf )
616
601
== "/universe/earth/home/"
617
602
)
618
- assert reverse ("universe:earth:home" ) == "/universe/earth/home/"
0 commit comments