Project

General

Profile

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

haketilo / test / misc_constants.py @ 5b2a7a61

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