def test_configure_https_disable_with_image_service(
         self, configs, image_service_joined):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['']
     configs.write = MagicMock()
     self.relation_ids.return_value = ['image-service:0']
     relations.configure_https()
     cmd = ['a2dissite', 'openstack_https_frontend']
     self.check_call.assert_called_with(cmd)
     image_service_joined.assert_called_with(relation_id='image-service:0')
 def test_configure_https_enable_with_identity_service(
         self, configs, keystone_joined):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['https']
     configs.write = MagicMock()
     self.relation_ids.return_value = ['identity-service:0']
     relations.configure_https()
     cmd = ['a2ensite', 'openstack_https_frontend']
     self.check_call.assert_called_with(cmd)
     keystone_joined.assert_called_with(relation_id='identity-service:0')
 def test_configure_https_disable_with_image_service(
         self, configs, image_service_joined, _canonical_url):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['']
     configs.write = MagicMock()
     self.relation_ids.return_value = ['image-service:0']
     relations.configure_https()
     self.check_call.assert_called_with(
         ['a2dissite', 'openstack_https_frontend'])
     self.service_reload.assert_called_with('apache2',
                                            restart_on_failure=True)
     image_service_joined.assert_called_with(relation_id='image-service:0')
 def test_configure_https_disable_with_image_service(
         self, configs, image_service_joined, _canonical_url):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['']
     configs.write = MagicMock()
     self.relation_ids.return_value = ['image-service:0']
     relations.configure_https()
     self.check_call.assert_called_with(['a2dissite',
                                         'openstack_https_frontend'])
     self.service_reload.assert_called_with('apache2',
                                            restart_on_failure=True)
     image_service_joined.assert_called_with(relation_id='image-service:0')