mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Removed cfg.product_name entry and tests
The name 'Plinth' (cfg.product_name) is not used anymore after my previous commits. Reason for the complete removal: I do not think that users should know or have to care about the internal name of the web interface of the FreedomBox.
This commit is contained in:
parent
c2bd038ef2
commit
125cb88336
@ -1,7 +1,3 @@
|
|||||||
[Name]
|
|
||||||
product_name = Plinth
|
|
||||||
box_name = FreedomBox
|
|
||||||
|
|
||||||
[Path]
|
[Path]
|
||||||
# directory locations
|
# directory locations
|
||||||
file_root = /usr/share/plinth
|
file_root = /usr/share/plinth
|
||||||
@ -39,6 +35,7 @@ use_x_forwarded_host = True
|
|||||||
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
|
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
|
||||||
|
|
||||||
[Misc]
|
[Misc]
|
||||||
|
box_name = FreedomBox
|
||||||
# The danube_edition changes the firstboot process and offers entering a
|
# The danube_edition changes the firstboot process and offers entering a
|
||||||
# voucher for a freedombox.me sub-domain. This functionality requires
|
# voucher for a freedombox.me sub-domain. This functionality requires
|
||||||
# additional debian packages to be installed:
|
# additional debian packages to be installed:
|
||||||
|
|||||||
@ -1,7 +1,3 @@
|
|||||||
[Name]
|
|
||||||
product_name = Plinth
|
|
||||||
box_name = FreedomBox
|
|
||||||
|
|
||||||
[Path]
|
[Path]
|
||||||
# directory locations
|
# directory locations
|
||||||
file_root = %(root)s
|
file_root = %(root)s
|
||||||
@ -39,6 +35,7 @@ use_x_forwarded_host = True
|
|||||||
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
|
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
|
||||||
|
|
||||||
[Misc]
|
[Misc]
|
||||||
|
box_name = FreedomBox
|
||||||
# The danube_edition changes the firstboot process and offers entering a
|
# The danube_edition changes the firstboot process and offers entering a
|
||||||
# voucher for a freedombox.me sub-domain. This functionality requires
|
# voucher for a freedombox.me sub-domain. This functionality requires
|
||||||
# additional debian packages to be installed:
|
# additional debian packages to be installed:
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import os
|
|||||||
|
|
||||||
from plinth.menu import Menu
|
from plinth.menu import Menu
|
||||||
|
|
||||||
product_name = None
|
|
||||||
box_name = None
|
box_name = None
|
||||||
root = None
|
root = None
|
||||||
file_root = None
|
file_root = None
|
||||||
@ -67,9 +66,7 @@ def read():
|
|||||||
})
|
})
|
||||||
parser.read(CONFIG_FILE)
|
parser.read(CONFIG_FILE)
|
||||||
|
|
||||||
config_items = {('Name', 'product_name', 'string'),
|
config_items = {('Path', 'root', 'string'),
|
||||||
('Name', 'box_name', 'string'),
|
|
||||||
('Path', 'root', 'string'),
|
|
||||||
('Path', 'file_root', 'string'),
|
('Path', 'file_root', 'string'),
|
||||||
('Path', 'config_dir', 'string'),
|
('Path', 'config_dir', 'string'),
|
||||||
('Path', 'data_dir', 'string'),
|
('Path', 'data_dir', 'string'),
|
||||||
@ -84,6 +81,7 @@ def read():
|
|||||||
('Network', 'port', 'int'),
|
('Network', 'port', 'int'),
|
||||||
('Network', 'secure_proxy_ssl_header', 'string'),
|
('Network', 'secure_proxy_ssl_header', 'string'),
|
||||||
('Network', 'use_x_forwarded_host', 'bool'),
|
('Network', 'use_x_forwarded_host', 'bool'),
|
||||||
|
('Misc', 'box_name', 'string'),
|
||||||
('Misc', 'danube_edition', 'bool')}
|
('Misc', 'danube_edition', 'bool')}
|
||||||
|
|
||||||
for section, name, datatype in config_items:
|
for section, name, datatype in config_items:
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
[Name]
|
[Misc]
|
||||||
product_name = Plinth
|
|
||||||
box_name = FreedomBox
|
box_name = FreedomBox
|
||||||
|
|
||||||
[Path]
|
[Path]
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
[Name]
|
[Misc]
|
||||||
product_name = Plinth
|
|
||||||
box_name = FreedomBox
|
box_name = FreedomBox
|
||||||
|
|
||||||
|
|||||||
@ -198,10 +198,6 @@ class CfgTestCase(unittest.TestCase):
|
|||||||
"""Compare two sets of configuration values."""
|
"""Compare two sets of configuration values."""
|
||||||
# Note that the count of items within each section includes the number
|
# Note that the count of items within each section includes the number
|
||||||
# of default items (1, for 'root').
|
# of default items (1, for 'root').
|
||||||
self.assertEqual(3, len(parser.items('Name')))
|
|
||||||
self.assertEqual(parser.get('Name', 'product_name'), cfg.product_name)
|
|
||||||
self.assertEqual(parser.get('Name', 'box_name'), cfg.box_name)
|
|
||||||
|
|
||||||
self.assertEqual(13, len(parser.items('Path')))
|
self.assertEqual(13, len(parser.items('Path')))
|
||||||
self.assertEqual(parser.get('Path', 'root'), cfg.root)
|
self.assertEqual(parser.get('Path', 'root'), cfg.root)
|
||||||
self.assertEqual(parser.get('Path', 'file_root'), cfg.file_root)
|
self.assertEqual(parser.get('Path', 'file_root'), cfg.file_root)
|
||||||
@ -225,8 +221,10 @@ class CfgTestCase(unittest.TestCase):
|
|||||||
self.assertIsInstance(cfg.use_x_forwarded_host, bool)
|
self.assertIsInstance(cfg.use_x_forwarded_host, bool)
|
||||||
self.assertEqual(parser.get('Network', 'use_x_forwarded_host'),
|
self.assertEqual(parser.get('Network', 'use_x_forwarded_host'),
|
||||||
str(cfg.use_x_forwarded_host))
|
str(cfg.use_x_forwarded_host))
|
||||||
|
self.assertEqual(3, len(parser.items('Misc')))
|
||||||
self.assertEqual(parser.get('Misc', 'danube_edition'),
|
self.assertEqual(parser.get('Misc', 'danube_edition'),
|
||||||
str(cfg.danube_edition))
|
str(cfg.danube_edition))
|
||||||
|
self.assertEqual(parser.get('Misc', 'box_name'), cfg.box_name)
|
||||||
|
|
||||||
def read_temp_config_file(self, test_file):
|
def read_temp_config_file(self, test_file):
|
||||||
"""Read the specified test configuration file."""
|
"""Read the specified test configuration file."""
|
||||||
|
|||||||
@ -40,7 +40,6 @@ class ContextProcessorsTestCase(TestCase):
|
|||||||
|
|
||||||
config = response['cfg']
|
config = response['cfg']
|
||||||
self.assertIsNotNone(config)
|
self.assertIsNotNone(config)
|
||||||
self.assertEqual('Plinth', config.product_name)
|
|
||||||
self.assertEqual('FreedomBox', config.box_name)
|
self.assertEqual('FreedomBox', config.box_name)
|
||||||
|
|
||||||
submenu = response['submenu']
|
submenu = response['submenu']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user