@@ -614,6 +614,12 @@ def test_download_template_config(self):
614614 response = self .client .get (path )
615615 self .assertEqual (response .get ('content-type' ), 'application/octet-stream' )
616616
617+ def test_template_has_download_config (self ):
618+ t = Template .objects .first ()
619+ path = reverse (f'admin:{ self .app_label } _template_change' , args = [t .pk ])
620+ r = self .client .get (path )
621+ self .assertContains (r , 'Download configuration' )
622+
617623 def test_preview_template (self ):
618624 template = Template .objects .get (name = 'radio0' )
619625 path = reverse (f'admin:{ self .app_label } _template_preview' )
@@ -759,6 +765,12 @@ def test_download_vpn_config(self):
759765 response = self .client .get (path )
760766 self .assertEqual (response .get ('content-type' ), 'application/octet-stream' )
761767
768+ def test_vpn_has_download_config (self ):
769+ v = self ._create_vpn ()
770+ path = reverse (f'admin:{ self .app_label } _vpn_change' , args = [v .pk ])
771+ r = self .client .get (path )
772+ self .assertContains (r , 'Download configuration' )
773+
762774 def test_preview_vpn (self ):
763775 v = self ._create_vpn ()
764776 path = reverse (f'admin:{ self .app_label } _vpn_preview' )
@@ -810,6 +822,14 @@ def test_error_if_download_config(self):
810822 )
811823 self .assertNotContains (res , 'Download configuration' )
812824
825+ def test_device_has_download_config (self ):
826+ d = self ._create_device ()
827+ t = Template .objects .first ()
828+ self ._create_config (device = d , backend = t .backend , config = t .config )
829+ path = reverse (f'admin:{ self .app_label } _device_change' , args = [d .pk ])
830+ r = self .client .get (path )
831+ self .assertContains (r , 'Download configuration' )
832+
813833 def test_preview_device_with_context (self ):
814834 path = reverse (f'admin:{ self .app_label } _device_preview' )
815835 config = json .dumps (
0 commit comments