mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-08 22:36:48 +02:00
add nodata tests
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
jc changelog
|
||||
|
||||
20200610 v1.11.5
|
||||
- Update airport_s parser to fix error on parsing empty data
|
||||
- Add tests to all parsers for no data condition
|
||||
|
||||
20200610 v1.11.4
|
||||
- Update ls parser to fix error on parsing an empty directory
|
||||
|
||||
|
@ -17,6 +17,12 @@ class MyTests(unittest.TestCase):
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/airport-I.json'), 'r', encoding='utf-8') as f:
|
||||
self.osx_10_14_6_airport_I_json = json.loads(f.read())
|
||||
|
||||
def test_airport_I_nodata(self):
|
||||
"""
|
||||
Test 'airport -I' with no data
|
||||
"""
|
||||
self.assertEqual(jc.parsers.airport.parse('', quiet=True), {})
|
||||
|
||||
def test_airport_I_osx_10_14_6(self):
|
||||
"""
|
||||
Test 'airport -I' on OSX 10.14.6
|
||||
|
@ -17,6 +17,12 @@ class MyTests(unittest.TestCase):
|
||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/airport-s.json'), 'r', encoding='utf-8') as f:
|
||||
self.osx_10_14_6_airport_s_json = json.loads(f.read())
|
||||
|
||||
def test_airport_s_nodata(self):
|
||||
"""
|
||||
Test 'airport -s' with no data
|
||||
"""
|
||||
self.assertEqual(jc.parsers.airport_s.parse('', quiet=True), [])
|
||||
|
||||
def test_airport_s_osx_10_14_6(self):
|
||||
"""
|
||||
Test 'airport -s' on OSX 10.14.6
|
||||
|
Reference in New Issue
Block a user