Skip to content

Commit a02440d

Browse files
committed
Adding test for missing case in plat_db
1 parent 2b03112 commit a02440d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/platform_database.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ def test_bogus_remove(self):
137137
self.assertEqual(self.pdb.get('NOTVALID', None), None)
138138
self.assertEqual(self.pdb.remove('NOTVALID', permanent=False), None)
139139

140+
def test_simplify_verbose_data(self):
141+
"""Test that fetching a verbose entry without verbose data correctly
142+
returns just the 'platform_name'
143+
"""
144+
platform_data = {
145+
'platform_name': 'VALID',
146+
'other_data': 'data'
147+
}
148+
self.pdb.add('1337', platform_data, permanent=False)
149+
self.assertEqual(self.pdb.get('1337', verbose_data=True), platform_data)
150+
self.assertEqual(self.pdb.get('1337'), platform_data['platform_name'])
151+
140152
class OverriddenPlatformDatabaseTests(unittest.TestCase):
141153
""" Test that for one database overriding another
142154
"""

0 commit comments

Comments
 (0)