aboutsummaryrefslogtreecommitdiffstats
path: root/selftest/resource_test
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-06 18:35:26 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-06 18:49:31 +0200
commitab1904a307b531dbd1c738ef04eeeeb68f9920b3 (patch)
tree665d524265171d0e977633f4c29536b9174d8364 /selftest/resource_test
parent636f560dc2f26d303a0bdb7115744cb402159131 (diff)
selftest: Move tests into own subdirectories
Diffstat (limited to 'selftest/resource_test')
l---------selftest/resource_test/_prep.py1
-rw-r--r--selftest/resource_test/conf/paths.conf2
-rw-r--r--selftest/resource_test/conf/resources.conf103
-rw-r--r--selftest/resource_test/resource_test.err0
-rw-r--r--selftest/resource_test/resource_test.ok289
-rw-r--r--selftest/resource_test/resource_test.ok.ign1
-rwxr-xr-xselftest/resource_test/resource_test.py131
7 files changed, 527 insertions, 0 deletions
diff --git a/selftest/resource_test/_prep.py b/selftest/resource_test/_prep.py
new file mode 120000
index 0000000..9cea3fe
--- /dev/null
+++ b/selftest/resource_test/_prep.py
@@ -0,0 +1 @@
+../_prep.py \ No newline at end of file
diff --git a/selftest/resource_test/conf/paths.conf b/selftest/resource_test/conf/paths.conf
new file mode 100644
index 0000000..0b2d035
--- /dev/null
+++ b/selftest/resource_test/conf/paths.conf
@@ -0,0 +1,2 @@
+state_dir: ./test_work/state_dir
+suites_dir: ./suite_test
diff --git a/selftest/resource_test/conf/resources.conf b/selftest/resource_test/conf/resources.conf
new file mode 100644
index 0000000..84d0ab9
--- /dev/null
+++ b/selftest/resource_test/conf/resources.conf
@@ -0,0 +1,103 @@
+# all hardware and interfaces available to this osmo-gsm-tester
+
+ip_address:
+- addr: 10.42.42.2
+- addr: 10.42.42.3
+- addr: 10.42.42.4
+- addr: 10.42.42.5
+- addr: 10.42.42.6
+
+bts:
+- label: sysmoBTS 1002
+ type: osmo-bts-sysmo
+ ipa_unit_id: 1
+ addr: 10.42.42.114
+ band: GSM-1800
+ direct_pcu: true
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+- label: Ettus B200
+ type: osmo-bts-trx
+ ipa_unit_id: 6
+ addr: 10.42.42.50
+ band: GSM-1800
+ osmo_trx:
+ launch_trx: true
+ clock_reference: external
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+- label: sysmoCell 5000
+ type: osmo-bts-trx
+ ipa_unit_id: 7
+ addr: 10.42.42.51
+ band: GSM-1800
+ osmo_trx:
+ launch_trx: false
+ clock_reference: external
+ trx_ip: 10.42.42.112
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+arfcn:
+ - arfcn: 512
+ band: GSM-1800
+ - arfcn: 514
+ band: GSM-1800
+ - arfcn: 516
+ band: GSM-1800
+ - arfcn: 518
+ band: GSM-1800
+ - arfcn: 520
+ band: GSM-1800
+ - arfcn: 540
+ band: GSM-1900
+ - arfcn: 542
+ band: GSM-1900
+ - arfcn: 544
+ band: GSM-1900
+ - arfcn: 546
+ band: GSM-1900
+ - arfcn: 548
+ band: GSM-1900
+
+modem:
+- label: sierra_1
+ path: '/sierra_1'
+ imsi: '901700000009031'
+ ki: '80A37E6FDEA931EAC92FFA5F671EFEAD'
+ auth_algo: 'comp128v1'
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+- label: sierra_2
+ path: '/sierra_2'
+ imsi: '901700000009029'
+ ki: '00969E283349D354A8239E877F2E0866'
+ auth_algo: 'comp128v1'
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+- label: gobi_0
+ path: '/gobi_0'
+ imsi: '901700000009030'
+ ki: 'BB70807226393CDBAC8DD3439FF54252'
+ auth_algo: 'comp128v1'
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
+
+- label: gobi_3
+ path: '/gobi_3'
+ imsi: '901700000009032'
+ ki: '2F70DCA43C45ACB97E947FDD0C7CA30A'
+ auth_algo: 'comp128v1'
+ ciphers:
+ - 'a5_0'
+ - 'a5_1'
diff --git a/selftest/resource_test/resource_test.err b/selftest/resource_test/resource_test.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/selftest/resource_test/resource_test.err
diff --git a/selftest/resource_test/resource_test.ok b/selftest/resource_test/resource_test.ok
new file mode 100644
index 0000000..bbdbc5b
--- /dev/null
+++ b/selftest/resource_test/resource_test.ok
@@ -0,0 +1,289 @@
+- expect solutions:
+[0, 1, 2]
+[0, 1, 2]
+[1, 0, 2]
+[1, 2, 0]
+- expect failure to solve:
+The requested resource requirements are not solvable [[0, 2], [2], [0, 2]]
+- test removing a Resources list from itself
+ok, caused exception RuntimeError: Refusing to drop a list of resources from itself. This is probably a bug where a list of Resources() should have been copied but is passed as-is. use Resources.clear() instead.
+- test removing a Resources list from one with the same list in it
+- test resources config and state dir:
+cnf -: DBG: Found config file paths.conf as [PATH]/selftest/resource_test/conf/paths.conf in [PATH]/selftest/resource_test/conf which is [PATH]/selftest/resource_test/conf
+cnf -: DBG: [PATH]/selftest/resource_test/conf/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/resource_test/conf/test_work/state_dir
+cnf -: DBG: [PATH]/selftest/resource_test/conf/paths.conf: relative path ./suite_test is [PATH]/selftest/resource_test/conf/suite_test
+cnf -: DBG: Found path state_dir as [PATH]/selftest/resource_test/conf/test_work/state_dir
+cnf ResourcesPool: DBG: Found config file resources.conf as [PATH]/selftest/resource_test/conf/resources.conf in [PATH]/selftest/resource_test/conf which is [PATH]/selftest/resource_test/conf
+cnf ResourcesPool: DBG: Found path state_dir as [PATH]/selftest/resource_test/conf/test_work/state_dir
+*** all resources:
+{'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
+ 'arfcn': '512',
+ 'band': 'GSM-1800'},
+ {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
+ 'arfcn': '514',
+ 'band': 'GSM-1800'},
+ {'_hash': '3199abf375a1dd899e554e9d63a552e06d7f38bf',
+ 'arfcn': '516',
+ 'band': 'GSM-1800'},
+ {'_hash': '57aa7bd1da62495f2857ae6b859193dd592a0a02',
+ 'arfcn': '518',
+ 'band': 'GSM-1800'},
+ {'_hash': '53dd2e2682b736f427abd2ce59a9a50ca8130678',
+ 'arfcn': '520',
+ 'band': 'GSM-1800'},
+ {'_hash': '31687a5e6d5140a4b3877606ca5f18244f11d706',
+ 'arfcn': '540',
+ 'band': 'GSM-1900'},
+ {'_hash': '1def43a5c88a83cdb21279eacab0679ea08ffaf3',
+ 'arfcn': '542',
+ 'band': 'GSM-1900'},
+ {'_hash': '1d6e3b08a3861fd4d748f111295ec5a93ecd3d23',
+ 'arfcn': '544',
+ 'band': 'GSM-1900'},
+ {'_hash': '8fb36927de15466fcdbee01f7f65704c312cb36c',
+ 'arfcn': '546',
+ 'band': 'GSM-1900'},
+ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369',
+ 'arfcn': '548',
+ 'band': 'GSM-1900'}],
+ 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
+ 'addr': '10.42.42.114',
+ 'band': 'GSM-1800',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'direct_pcu': 'True',
+ 'ipa_unit_id': '1',
+ 'label': 'sysmoBTS 1002',
+ 'type': 'osmo-bts-sysmo'},
+ {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
+ 'addr': '10.42.42.50',
+ 'band': 'GSM-1800',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'ipa_unit_id': '6',
+ 'label': 'Ettus B200',
+ 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
+ 'type': 'osmo-bts-trx'},
+ {'_hash': 'f964ba5fe7a37b97ec3e0c4ef21c9231a19de45d',
+ 'addr': '10.42.42.51',
+ 'band': 'GSM-1800',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'ipa_unit_id': '7',
+ 'label': 'sysmoCell 5000',
+ 'osmo_trx': {'clock_reference': 'external',
+ 'launch_trx': 'False',
+ 'trx_ip': '10.42.42.112'},
+ 'type': 'osmo-bts-trx'}],
+ 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
+ 'addr': '10.42.42.2'},
+ {'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f',
+ 'addr': '10.42.42.3'},
+ {'_hash': '862b529c701adf302477bc126a8032cfc2ec4753',
+ 'addr': '10.42.42.4'},
+ {'_hash': '05feb6e1e24ca4235889eb28d0a8d5cedac6e5d1',
+ 'addr': '10.42.42.5'},
+ {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c',
+ 'addr': '10.42.42.6'}],
+ 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009031',
+ 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
+ 'label': 'sierra_1',
+ 'path': '/sierra_1'},
+ {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009029',
+ 'ki': '00969E283349D354A8239E877F2E0866',
+ 'label': 'sierra_2',
+ 'path': '/sierra_2'},
+ {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009030',
+ 'ki': 'BB70807226393CDBAC8DD3439FF54252',
+ 'label': 'gobi_0',
+ 'path': '/gobi_0'},
+ {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009032',
+ 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A',
+ 'label': 'gobi_3',
+ 'path': '/gobi_3'}]}
+*** end: all resources
+
+- request some resources
+--- testowner: Reserving 2 x arfcn (candidates: 10)
+--- testowner: DBG: Picked - _hash: e620569450f8259b3f0212ec19c285dd07df063c
+ arfcn: '512'
+ band: GSM-1800
+- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
+ arfcn: '514'
+ band: GSM-1800
+--- testowner: Reserving 2 x bts (candidates: 3)
+--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6
+ addr: 10.42.42.114
+ band: GSM-1800
+ ciphers:
+ - a5_0
+ - a5_1
+ direct_pcu: 'True'
+ ipa_unit_id: '1'
+ label: sysmoBTS 1002
+ type: osmo-bts-sysmo
+- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
+ addr: 10.42.42.50
+ band: GSM-1800
+ ciphers:
+ - a5_0
+ - a5_1
+ ipa_unit_id: '6'
+ label: Ettus B200
+ osmo_trx:
+ clock_reference: external
+ launch_trx: 'True'
+ type: osmo-bts-trx
+--- testowner: Reserving 1 x ip_address (candidates: 5)
+--- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
+ addr: 10.42.42.2
+--- testowner: Reserving 2 x modem (candidates: 4)
+--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
+ auth_algo: comp128v1
+ ciphers:
+ - a5_0
+ - a5_1
+ imsi: '901700000009031'
+ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
+ label: sierra_1
+ path: /sierra_1
+- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
+ auth_algo: comp128v1
+ ciphers:
+ - a5_0
+ - a5_1
+ imsi: '901700000009029'
+ ki: 00969E283349D354A8239E877F2E0866
+ label: sierra_2
+ path: /sierra_2
+~~~ currently reserved:
+arfcn:
+- _hash: e620569450f8259b3f0212ec19c285dd07df063c
+ _reserved_by: testowner-123-1490837279
+ arfcn: '512'
+ band: GSM-1800
+- _hash: 022621e513c5a5bf33b77430a1e9c886be676fa1
+ _reserved_by: testowner-123-1490837279
+ arfcn: '514'
+ band: GSM-1800
+bts:
+- _hash: d2aa7c1124943de352351b650ca0c751784da6b6
+ _reserved_by: testowner-123-1490837279
+ addr: 10.42.42.114
+ band: GSM-1800
+ ciphers:
+ - a5_0
+ - a5_1
+ direct_pcu: 'True'
+ ipa_unit_id: '1'
+ label: sysmoBTS 1002
+ type: osmo-bts-sysmo
+- _hash: 2158317d5e0055070e7174c2498dedf53a2957e9
+ _reserved_by: testowner-123-1490837279
+ addr: 10.42.42.50
+ band: GSM-1800
+ ciphers:
+ - a5_0
+ - a5_1
+ ipa_unit_id: '6'
+ label: Ettus B200
+ osmo_trx:
+ clock_reference: external
+ launch_trx: 'True'
+ type: osmo-bts-trx
+ip_address:
+- _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c
+ _reserved_by: testowner-123-1490837279
+ addr: 10.42.42.2
+modem:
+- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0
+ _reserved_by: testowner-123-1490837279
+ auth_algo: comp128v1
+ ciphers:
+ - a5_0
+ - a5_1
+ imsi: '901700000009031'
+ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD
+ label: sierra_1
+ path: /sierra_1
+- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3
+ _reserved_by: testowner-123-1490837279
+ auth_algo: comp128v1
+ ciphers:
+ - a5_0
+ - a5_1
+ imsi: '901700000009029'
+ ki: 00969E283349D354A8239E877F2E0866
+ label: sierra_2
+ path: /sierra_2
+
+~~~ end: currently reserved
+
+~~~ with modifiers:
+resources(testowner)={'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'arfcn': '512',
+ 'band': 'GSM-1800'},
+ {'_hash': '022621e513c5a5bf33b77430a1e9c886be676fa1',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'arfcn': '514',
+ 'band': 'GSM-1800'}],
+ 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'addr': '10.42.42.114',
+ 'band': 'GSM-1800',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'direct_pcu': 'True',
+ 'ipa_unit_id': '1',
+ 'label': 'sysmoBTS 1002',
+ 'type': 'osmo-bts-sysmo'},
+ {'_hash': '2158317d5e0055070e7174c2498dedf53a2957e9',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'addr': '10.42.42.50',
+ 'band': 'GSM-1800',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'ipa_unit_id': '6',
+ 'label': 'Ettus B200',
+ 'num_trx': 2,
+ 'osmo_trx': {'clock_reference': 'external', 'launch_trx': 'True'},
+ 'type': 'osmo-bts-trx'}],
+ 'ip_address': [{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'addr': '10.42.42.2'}],
+ 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009031',
+ 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD',
+ 'label': 'sierra_1',
+ 'path': '/sierra_1'},
+ {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3',
+ '_reserved_by': 'testowner-123-1490837279',
+ 'auth_algo': 'comp128v1',
+ 'ciphers': ['a5_0', 'a5_1'],
+ 'imsi': '901700000009029',
+ 'ki': '00969E283349D354A8239E877F2E0866',
+ 'label': 'sierra_2',
+ 'path': '/sierra_2'}]}
+~~~ end: with modifiers:
+~~~ currently reserved:
+{}
+
+~~~ end: currently reserved
+
+- item_matches:
+1st subset matches correctly, pass
+2nd subset matches correctly, pass
+3rd subset should not match, pass
+3rd subset should not match, pass
+4th subset should not match, pass
diff --git a/selftest/resource_test/resource_test.ok.ign b/selftest/resource_test/resource_test.ok.ign
new file mode 100644
index 0000000..393ce95
--- /dev/null
+++ b/selftest/resource_test/resource_test.ok.ign
@@ -0,0 +1 @@
+/[^ ]*/selftest/ [PATH]/selftest/
diff --git a/selftest/resource_test/resource_test.py b/selftest/resource_test/resource_test.py
new file mode 100755
index 0000000..39a7eb6
--- /dev/null
+++ b/selftest/resource_test/resource_test.py
@@ -0,0 +1,131 @@
+#!/usr/bin/env python3
+
+import tempfile
+import os
+import sys
+import pprint
+import shutil
+import atexit
+import _prep
+from osmo_gsm_tester.core import config, log, util, resource
+from osmo_gsm_tester.core.schema import generate_schemas
+
+workdir = util.get_tempdir()
+
+# override config locations to make sure we use only the test conf
+config.ENV_CONF = os.path.join(os.path.dirname(sys.argv[0]), 'conf')
+
+log.get_process_id = lambda: '123-1490837279'
+
+# Generate supported schemas dynamically from objects:
+generate_schemas()
+
+print('- expect solutions:')
+pprint.pprint(
+ resource.solve([ [0, 1, 2],
+ [0, 1, 2],
+ [0, 1, 2] ]) )
+pprint.pprint(
+ resource.solve([ [0, 1, 2],
+ [0, 1],
+ [0, 2] ]) ) # == [0, 1, 2]
+pprint.pprint(
+ resource.solve([ [0, 1, 2],
+ [0],
+ [0, 2] ]) ) # == [1, 0, 2]
+pprint.pprint(
+ resource.solve([ [0, 1, 2],
+ [2],
+ [0, 2] ]) ) # == [1, 2, 0]
+
+print('- expect failure to solve:')
+try:
+ resource.solve([ [0, 2],
+ [2],
+ [0, 2] ])
+ assert False
+except resource.NotSolvable as e:
+ print(e)
+
+print('- test removing a Resources list from itself')
+try:
+ r = resource.Resources({ 'k': [ {'a': 1, 'b': 2}, {'a': 3, 'b': 4}, ],
+ 'i': [ {'c': 1, 'd': 2}, {'c': 3, 'd': 4}, ] })
+ r.drop(r)
+ assert False
+except RuntimeError as e:
+ print('ok, caused exception RuntimeError: %s' % str(e))
+
+print('- test removing a Resources list from one with the same list in it')
+r = resource.Resources({ 'k': [ {'a': 1, 'b': 2}, {'a': 3, 'b': 4}, ],
+ 'i': [ {'c': 1, 'd': 2}, {'c': 3, 'd': 4}, ] })
+r.drop({ 'k': r.get('k'), 'i': r.get('i') })
+assert not r
+
+print('- test resources config and state dir:')
+resources_conf = os.path.join(_prep.script_dir, 'resource_test', 'etc',
+ 'resources.conf')
+
+state_dir = config.get_state_dir()
+rrfile = state_dir.child(resource.RESERVED_RESOURCES_FILE)
+
+pool = resource.ResourcesPool()
+
+print('*** all resources:')
+pprint.pprint(pool.all_resources)
+print('*** end: all resources\n')
+
+print('- request some resources')
+want = {
+ 'ip_address': [ { 'times': 1 } ],
+ 'bts': [ { 'type': 'osmo-bts-sysmo', 'times': 1 , 'ciphers': ['a5_1']}, { 'type': 'osmo-bts-trx', 'times': 1 } ],
+ 'arfcn': [ { 'band': 'GSM-1800', 'times': 2 } ],
+ 'modem': [ { 'times': 2 , 'ciphers': ['a5_0', 'a5_1']} ],
+ }
+modifiers = {
+ 'bts': [ {}, {'num_trx': 2 }],
+}
+origin = log.Origin(None, 'testowner')
+
+resources = pool.reserve(origin, config.replicate_times(want), config.replicate_times(modifiers))
+
+print('~~~ currently reserved:')
+with open(rrfile, 'r') as f:
+ print(f.read())
+print('~~~ end: currently reserved\n')
+
+print('~~~ with modifiers:')
+print(repr(resources))
+print('~~~ end: with modifiers:')
+
+resources.free()
+
+print('~~~ currently reserved:')
+with open(rrfile, 'r') as f:
+ print(f.read())
+print('~~~ end: currently reserved\n')
+
+print('- item_matches:')
+superset = { 'hello': 'world', 'foo': 'bar', 'ordered_list': [{'xkey': 'xvalue'},{'ykey': 'yvalue'}], 'unordered_list_set': [1, 2, 3]}
+
+subset = { 'foo': 'bar', 'ordered_list': [{'xkey': 'xvalue'},{'ykey': 'yvalue'}], 'unordered_list_set': [2, 1] }
+if resource.item_matches(superset, subset):
+ print('1st subset matches correctly, pass')
+
+subset = { 'ordered_list': [{},{'ykey': 'yvalue'}], 'unordered_list_set': [] }
+if resource.item_matches(superset, subset):
+ print('2nd subset matches correctly, pass')
+
+subset = { 'ordered_list': [{'ykey': 'yvalue'}, {'xkey': 'xvalue'}] }
+if not resource.item_matches(superset, subset):
+ print('3rd subset should not match, pass')
+
+subset = { 'ordered_list': [{'xkey': 'xvalue'}, {'ykey': 'yvalue'}, {'zkey': 'zvalue'}] }
+if not resource.item_matches(superset, subset):
+ print('3rd subset should not match, pass')
+
+subset = { 'unordered_list_set': [4] }
+if not resource.item_matches(superset, subset):
+ print('4th subset should not match, pass')
+
+# vim: expandtab tabstop=4 shiftwidth=4