[gnome-battery-bench] integration-test: adapt for json output change
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-battery-bench] integration-test: adapt for json output change
- Date: Tue, 23 May 2017 16:22:26 +0000 (UTC)
commit c4d6f9d7f1431f805cfe3408e5d6c5fdee8928ca
Author: Christian Kellner <gicmo gnome org>
Date: Thu May 11 14:27:49 2017 +0200
integration-test: adapt for json output change
The JSON we get from 'gbb info --json' is now omitting fields that
were previously reported as 'Unknown'.
src/integration-test | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/integration-test b/src/integration-test
index 93dbde9..715007c 100755
--- a/src/integration-test
+++ b/src/integration-test
@@ -192,8 +192,8 @@ class Tests(unittest.TestCase):
def test_basic(self):
'''Basic system information (model, bios, etc)
- In the first run we ensure that we get 'Unknown' for all
- fields that we haven't set in /sys, then we fill them for them
+ In the first run we ensure that we don't have the fields in the
+ json that we haven't set in /sys, then we fill them for them
second run and check we get the right values
'''
log = self.gbb("info", ["--json"])
@@ -201,12 +201,8 @@ class Tests(unittest.TestCase):
self.assertIn('hardware', out)
hw = out['hardware']
- for key in ['vendor', 'version', 'name']:
- self.assertEqual(hw[key], 'Unknown')
- self.assertIn('bios', hw)
- bios = hw['bios']
- for key in ['vendor', 'version', 'date']:
- self.assertEqual(bios[key], 'Unknown')
+ for key in ['vendor', 'version', 'name', 'bios']:
+ self.assertNotIn(key, hw)
self.assertIn('batteries', hw)
self.assertEqual(len(hw['batteries']), 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]