[orca/new-settings] Added some test cases to the settings test



commit 0627fe2c045dde4ccdc9cd43aed98290e4a08c5d
Author: Juanje Ojeda <jojeda emergya es>
Date:   Tue Nov 2 03:18:54 2010 +0100

    Added some test cases to the settings test

 test/harness/importFile2.conf |    3 +++
 test/harness/settings_test.py |   19 +++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/test/harness/importFile2.conf b/test/harness/importFile2.conf
new file mode 100644
index 0000000..c786f40
--- /dev/null
+++ b/test/harness/importFile2.conf
@@ -0,0 +1,3 @@
+profile: [Laptop, laptop]
+keyboardLayout: 2
+quitOrcaNoConfirmation: true
diff --git a/test/harness/settings_test.py b/test/harness/settings_test.py
index b791851..daac175 100644
--- a/test/harness/settings_test.py
+++ b/test/harness/settings_test.py
@@ -55,16 +55,27 @@ def exerciseBackendAPI(backendName, profile):
     print "\n\nIs Classic Backend? => ", isClassic
     isFirstStart = settingsManager.isFirstStart()
     print "\n\nIs First Start? => ", isFirstStart
-    #settingsManager.setFirstStart()
+    print "\n\nSetting firstStart key"
+    settingsManager.setFirstStart()
+    isFirstStart = settingsManager.isFirstStart()
+    print "\n\nIs First Start? => ", isFirstStart
     print "\n\n===========================================================\n\n"
 
-    print "\n\nTesting import from a file"
+    print "\n\nTesting import from a file I"
     print "\n==========================================================="
     availableProfilesBefore = settingsManager.availableProfiles()
     print "\nAvailable Profiles BEFORE the import  => ", availableProfilesBefore
     settingsManager.importProfile('importFile.conf')
     availableProfilesAfter = settingsManager.availableProfiles()
     print "\nAvailable Profiles AFTER the import  => ", availableProfilesAfter
+
+    print "\n\nTesting import from a file II"
+    print "\n==========================================================="
+    availableProfilesBefore = settingsManager.availableProfiles()
+    print "\nAvailable Profiles BEFORE the import  => ", availableProfilesBefore
+    settingsManager.importProfile('importFile2.conf')
+    availableProfilesAfter = settingsManager.availableProfiles()
+    print "\nAvailable Profiles AFTER the import  => ", availableProfilesAfter
     
 
 def getSettingsFromFile(dictName):
@@ -83,6 +94,6 @@ def getSettingsFromFile(dictName):
 profile = 'default'
 print 'profile: default backendName: yaml\n'
 exerciseBackendAPI('yaml', 'default')
-print 'profile: default backendName: gconf\n'
-exerciseBackendAPI('gconf', 'default')
+#print 'profile: default backendName: gconf\n'
+#exerciseBackendAPI('gconf', 'default')
 #exerciseBackendAPI('default', 'gsettings', s)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]