Univention Bugzilla – Attachment 8273 Details for
Bug 39236
Open an App via URL query
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
/usr/share/ucs-test/20_appcenter/19_can_apps_be_opened_via_url
file_39236.txt (text/plain), 1.61 KB, created by
Julius Hinrichs
on 2016-12-01 17:30 CET
(
hide
)
Description:
/usr/share/ucs-test/20_appcenter/19_can_apps_be_opened_via_url
Filename:
MIME Type:
Creator:
Julius Hinrichs
Created:
2016-12-01 17:30 CET
Size:
1.61 KB
patch
obsolete
>#!/usr/share/ucs-test/runner python >## desc: Check if an app's page in the appcenter can be opened via url. >## roles: [domaincontroller_master] >## tags: [basic, apptest] >## bugs: [38544, 39236] >## packages: [univention-management-console-module-appcenter] >## exposure: careful > > >from httplib import HTTPException >import json > >import univention.testing.utils as utils >from univention.testing.umc import UMCTestConnection > > >REQUEST_METHOD = 'POST' >APPCENTER_URL = 'https://localhost/univention-management-console/command/appcenter/get' >APP_NAME = 'univention-demo' ># redirected from https://localhost/univention-management-console/?module=appcenter&flavor=appcenter&app=APP_NAME > > >fail_messages = [] > >try: > connection = UMCTestConnection('localhost') > umc_connection = connection.get_connection() > options = json.dumps({'options': {'application': APP_NAME}}) > headers = connection._headers > umc_connection.request(REQUEST_METHOD, APPCENTER_URL, options, headers) > umc_response = umc_connection.getresponse() > status = umc_response.status > response = json.loads(umc_response.read()) >except HTTPException as e: > utils.fail("Exception while making request '%s':\n%s: %s" % (APPCENTER_URL, type(e), e)) > >if status != 200: > fail_messages += ["The server returned status code %d." % status] > >try: > if response['result']['id'] != APP_NAME: > raise AssertionError("response['result']['id'] != APP_NAME") >except (KeyError, AssertionError) as e: > fail_messages += ["The server did not return the page of the requested app '%s':\n%s: %s" % (APP_NAME, type(e), e)] > >if fail_messages: > utils.fail('\n'.join(fail_messages))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 39236
: 8273