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:
fonfon 2015-10-14 15:13:03 +00:00 committed by James Valleroy
parent c2bd038ef2
commit 125cb88336
7 changed files with 8 additions and 21 deletions

View File

@ -1,7 +1,3 @@
[Name]
product_name = Plinth
box_name = FreedomBox
[Path]
# directory locations
file_root = /usr/share/plinth
@ -39,6 +35,7 @@ use_x_forwarded_host = True
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
[Misc]
box_name = FreedomBox
# The danube_edition changes the firstboot process and offers entering a
# voucher for a freedombox.me sub-domain. This functionality requires
# additional debian packages to be installed:

View File

@ -1,7 +1,3 @@
[Name]
product_name = Plinth
box_name = FreedomBox
[Path]
# directory locations
file_root = %(root)s
@ -39,6 +35,7 @@ use_x_forwarded_host = True
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
[Misc]
box_name = FreedomBox
# The danube_edition changes the firstboot process and offers entering a
# voucher for a freedombox.me sub-domain. This functionality requires
# additional debian packages to be installed:

View File

@ -20,7 +20,6 @@ import os
from plinth.menu import Menu
product_name = None
box_name = None
root = None
file_root = None
@ -67,9 +66,7 @@ def read():
})
parser.read(CONFIG_FILE)
config_items = {('Name', 'product_name', 'string'),
('Name', 'box_name', 'string'),
('Path', 'root', 'string'),
config_items = {('Path', 'root', 'string'),
('Path', 'file_root', 'string'),
('Path', 'config_dir', 'string'),
('Path', 'data_dir', 'string'),
@ -84,6 +81,7 @@ def read():
('Network', 'port', 'int'),
('Network', 'secure_proxy_ssl_header', 'string'),
('Network', 'use_x_forwarded_host', 'bool'),
('Misc', 'box_name', 'string'),
('Misc', 'danube_edition', 'bool')}
for section, name, datatype in config_items:

View File

@ -1,5 +1,4 @@
[Name]
product_name = Plinth
[Misc]
box_name = FreedomBox
[Path]

View File

@ -1,4 +1,3 @@
[Name]
product_name = Plinth
[Misc]
box_name = FreedomBox

View File

@ -198,10 +198,6 @@ class CfgTestCase(unittest.TestCase):
"""Compare two sets of configuration values."""
# Note that the count of items within each section includes the number
# 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(parser.get('Path', 'root'), cfg.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.assertEqual(parser.get('Network', 'use_x_forwarded_host'),
str(cfg.use_x_forwarded_host))
self.assertEqual(3, len(parser.items('Misc')))
self.assertEqual(parser.get('Misc', 'danube_edition'),
str(cfg.danube_edition))
self.assertEqual(parser.get('Misc', 'box_name'), cfg.box_name)
def read_temp_config_file(self, test_file):
"""Read the specified test configuration file."""

View File

@ -40,7 +40,6 @@ class ContextProcessorsTestCase(TestCase):
config = response['cfg']
self.assertIsNotNone(config)
self.assertEqual('Plinth', config.product_name)
self.assertEqual('FreedomBox', config.box_name)
submenu = response['submenu']