Project

General

Profile

Download (2.89 KB) Statistics
| Branch: | Tag: | Revision:

haketilo / test / misc_constants.py @ c699b640

1
# SPDX-License-Identifier: AGPL-3.0-or-later
2

    
3
"""
4
Miscellaneous data that were found useful
5
"""
6

    
7
# This file is part of Haketilo.
8
#
9
# Copyright (C) 2021 jahoti <jahoti@tilde.team>
10
# Copyright (C) 2021 Wojtek Kosior <koszko@koszko.org>
11
#
12
# This program is free software: you can redistribute it and/or modify
13
# it under the terms of the GNU Affero General Public License as
14
# published by the Free Software Foundation, either version 3 of the
15
# License, or (at your option) any later version.
16
#
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
# GNU Affero General Public License for more details.
21
#
22
# You should have received a copy of the GNU Affero General Public License
23
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
24
#
25
#
26
# I, Wojtek Kosior, thereby promise not to sue for violation of this
27
# file's license. Although I request that you do not make use this code
28
# in a proprietary program, I am not going to enforce this in court.
29

    
30
from pathlib import Path
31

    
32
here = Path(__file__).resolve().parent
33

    
34
default_firefox_binary = '/usr/lib/icecat/icecat'
35
# The browser might be loading some globally-installed add-ons by default. They
36
# could interfere with the tests, so we'll disable all of them.
37
default_clean_profile_dir = here / 'default_profile' / 'icecat_empty'
38

    
39
default_proxy_host = '127.0.0.1'
40
default_proxy_port = 1337
41

    
42
default_cert_dir = here / 'certs'
43

    
44
default_extension_uuid = 'a1291446-be95-48ad-a4c6-a475e389399b'
45
default_haketilo_id = '{6fe13369-88e9-440f-b837-5012fb3bedec}'
46

    
47
mime_types = {
48
	"7z": "application/x-7z-compressed",	"oga": "audio/ogg",
49
	"abw": "application/x-abiword",		"ogv": "video/ogg",
50
	"arc": "application/x-freearc",		"ogx": "application/ogg",
51
	"bin": "application/octet-stream",	"opus": "audio/opus",
52
	"bz": "application/x-bzip",		"otf": "font/otf",
53
	"bz2": "application/x-bzip2",		"pdf": "application/pdf",
54
	"css": "text/css",			"png": "image/png",
55
	"csv": "text/csv",			"sh": "application/x-sh",
56
	"gif": "image/gif",			"svg": "image/svg+xml",
57
	"gz": "application/gzip",		"tar": "application/x-tar",
58
	"htm": "text/html",			"ts": "video/mp2t",
59
	"html": "text/html",			"ttf": "font/ttf",
60
	"ico": "image/vnd.microsoft.icon",	"txt": "text/plain",
61
	"js": "text/javascript",		"wav": "audio/wav",
62
	"jpeg": "image/jpeg",			"weba": "audio/webm",
63
	"jpg": "image/jpeg",			"webm": "video/webm",
64
	"json": "application/json",		"woff": "font/woff",
65
	"mjs": "text/javascript",		"woff2": "font/woff2",
66
	"mp3": "audio/mpeg",			"xhtml": "application/xhtml+xml",
67
	"mp4": "video/mp4",			"zip": "application/zip",
68
	"mpeg": "video/mpeg",
69
	"odp": "application/vnd.oasis.opendocument.presentation",
70
	"ods": "application/vnd.oasis.opendocument.spreadsheet",
71
	"odt": "application/vnd.oasis.opendocument.text",
72
	"xml": "application/xml" # text/xml if readable from casual users
73
}
(4-4/9)