コード例 #1
0
 def test_disable_first_time_wizard(self):
     put_response = 'Success'
     self._init_filer(put_response=put_response)
     ret = config.Config(self._filer).disable_wizard()
     self._filer.put.assert_called_once_with('/config/gui/openFirstTimeWizard', False)
     self.assertEqual(ret, put_response)
コード例 #2
0
 def test_set_location(self):
     self._init_filer(put_response=self._location)
     ret = config.Config(self._filer).set_location(self._location)
     self._filer.put.assert_called_once_with('/config/device/location', self._location)
     self.assertEqual(ret, self._location)
コード例 #3
0
 def test_is_wizard_enabled(self):
     get_response = True
     self._init_filer(get_response=get_response)
     ret = config.Config(self._filer).is_wizard_enabled()
     self._filer.get.assert_called_once_with('/config/gui/openFirstTimeWizard')
     self.assertEqual(ret, get_response)
コード例 #4
0
 def test_set_hostname(self):
     self._init_filer(put_response=self._hostname)
     ret = config.Config(self._filer).set_hostname(self._hostname)
     self._filer.put.assert_called_once_with('/config/device/hostname', self._hostname)
     self.assertEqual(ret, self._hostname)