@@ -463,13 +463,6 @@ def test_domain_public(self):
463
463
with override_settings (USE_SUBDOMAIN = True ):
464
464
url = resolve_domain (project = self .translation )
465
465
self .assertEqual (url , 'pip.public.readthedocs.org' )
466
- # Private overrides domain
467
- with override_settings (USE_SUBDOMAIN = False ):
468
- url = resolve_domain (project = self .translation , private = True )
469
- self .assertEqual (url , 'readthedocs.org' )
470
- with override_settings (USE_SUBDOMAIN = True ):
471
- url = resolve_domain (project = self .translation , private = True )
472
- self .assertEqual (url , 'pip.public.readthedocs.org' )
473
466
474
467
@override_settings (
475
468
PRODUCTION_DOMAIN = 'readthedocs.org' ,
@@ -584,25 +577,28 @@ def test_resolver_subproject_alias(self):
584
577
585
578
@override_settings (PRODUCTION_DOMAIN = 'readthedocs.org' )
586
579
def test_resolver_private_project (self ):
580
+ self .pip .privacy_level = PRIVATE
581
+ self .pip .save ()
587
582
with override_settings (USE_SUBDOMAIN = False ):
588
- url = resolve (project = self .pip , private = True )
583
+ url = resolve (project = self .pip )
589
584
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
590
585
with override_settings (USE_SUBDOMAIN = True ):
591
- url = resolve (project = self .pip , private = True )
586
+ url = resolve (project = self .pip )
592
587
self .assertEqual (url , 'http://pip.readthedocs.org/en/latest/' )
593
588
594
589
@override_settings (PRODUCTION_DOMAIN = 'readthedocs.org' )
595
590
def test_resolver_private_project_override (self ):
596
591
self .pip .privacy_level = PRIVATE
592
+ self .pip .save ()
597
593
with override_settings (USE_SUBDOMAIN = False ):
598
594
url = resolve (project = self .pip )
599
595
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
600
- url = resolve (project = self .pip , private = False )
596
+ url = resolve (project = self .pip )
601
597
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
602
598
with override_settings (USE_SUBDOMAIN = True ):
603
599
url = resolve (project = self .pip )
604
600
self .assertEqual (url , 'http://pip.readthedocs.org/en/latest/' )
605
- url = resolve (project = self .pip , private = False )
601
+ url = resolve (project = self .pip )
606
602
self .assertEqual (url , 'http://pip.readthedocs.org/en/latest/' )
607
603
608
604
@override_settings (PRODUCTION_DOMAIN = 'readthedocs.org' )
@@ -613,12 +609,12 @@ def test_resolver_private_version_override(self):
613
609
with override_settings (USE_SUBDOMAIN = False ):
614
610
url = resolve (project = self .pip )
615
611
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
616
- url = resolve (project = self .pip , private = False )
612
+ url = resolve (project = self .pip )
617
613
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
618
614
with override_settings (USE_SUBDOMAIN = True ):
619
615
url = resolve (project = self .pip )
620
616
self .assertEqual (url , 'http://pip.readthedocs.org/en/latest/' )
621
- url = resolve (project = self .pip , private = False )
617
+ url = resolve (project = self .pip )
622
618
self .assertEqual (url , 'http://pip.readthedocs.org/en/latest/' )
623
619
624
620
@override_settings (
@@ -627,16 +623,16 @@ def test_resolver_private_version_override(self):
627
623
)
628
624
def test_resolver_public_domain_overrides (self ):
629
625
with override_settings (USE_SUBDOMAIN = False ):
630
- url = resolve (project = self .pip , private = True )
626
+ url = resolve (project = self .pip )
631
627
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
632
- url = resolve (project = self .pip , private = False )
628
+ url = resolve (project = self .pip )
633
629
self .assertEqual (url , 'http://readthedocs.org/docs/pip/en/latest/' )
634
630
with override_settings (USE_SUBDOMAIN = True ):
635
- url = resolve (project = self .pip , private = True )
631
+ url = resolve (project = self .pip )
636
632
self .assertEqual (
637
633
url , 'http://pip.public.readthedocs.org/en/latest/' ,
638
634
)
639
- url = resolve (project = self .pip , private = False )
635
+ url = resolve (project = self .pip )
640
636
self .assertEqual (
641
637
url , 'http://pip.public.readthedocs.org/en/latest/' ,
642
638
)
@@ -649,14 +645,14 @@ def test_resolver_public_domain_overrides(self):
649
645
canonical = True ,
650
646
)
651
647
with override_settings (USE_SUBDOMAIN = True ):
652
- url = resolve (project = self .pip , private = True )
648
+ url = resolve (project = self .pip )
653
649
self .assertEqual (url , 'http://docs.foobar.com/en/latest/' )
654
- url = resolve (project = self .pip , private = False )
650
+ url = resolve (project = self .pip )
655
651
self .assertEqual (url , 'http://docs.foobar.com/en/latest/' )
656
652
with override_settings (USE_SUBDOMAIN = False ):
657
- url = resolve (project = self .pip , private = True )
653
+ url = resolve (project = self .pip )
658
654
self .assertEqual (url , 'http://docs.foobar.com/en/latest/' )
659
- url = resolve (project = self .pip , private = False )
655
+ url = resolve (project = self .pip )
660
656
self .assertEqual (url , 'http://docs.foobar.com/en/latest/' )
661
657
662
658
@override_settings (
@@ -666,14 +662,14 @@ def test_resolver_public_domain_overrides(self):
666
662
)
667
663
def test_resolver_domain_https (self ):
668
664
with override_settings (PUBLIC_DOMAIN_USES_HTTPS = True ):
669
- url = resolve (project = self .pip , private = True )
665
+ url = resolve (project = self .pip )
670
666
self .assertEqual (url , 'https://pip.readthedocs.io/en/latest/' )
671
667
672
- url = resolve (project = self .pip , private = False )
668
+ url = resolve (project = self .pip )
673
669
self .assertEqual (url , 'https://pip.readthedocs.io/en/latest/' )
674
670
675
671
with override_settings (PUBLIC_DOMAIN_USES_HTTPS = False ):
676
- url = resolve (project = self .pip , private = True )
672
+ url = resolve (project = self .pip )
677
673
self .assertEqual (url , 'http://pip.readthedocs.io/en/latest/' )
678
674
679
675
0 commit comments