Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added zonename attribute #65

Merged
merged 3 commits into from
Mar 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added zonename attribute
  • Loading branch information
Ritwick DSouza committed Mar 10, 2017
commit a569f8f35b052483e02f8cf4d9d2907b8b7207dc
1 change: 1 addition & 0 deletions netjsonconfig/backends/openwrt/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def _get_system(self):
general.update({
'hostname': general.get('hostname', 'OpenWRT'),
'timezone': timezone_value,
'zonename': timezone_human,
})
return sorted_dict(general)

Expand Down
1 change: 1 addition & 0 deletions tests/openwisp/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def test_uci(self):
config system 'system'
option hostname 'openwisp-test'
option timezone 'UTC'
option zonename 'UTC'
""")
self.assertEqual(contents, expected)
tar.close()
Expand Down
1 change: 1 addition & 0 deletions tests/openwrt/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def test_system(self):
option custom_setting '1'
option hostname 'test-system'
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
option zonename 'Europe/Rome'
""")
self.assertEqual(o.render(), expected)

Expand Down