Lines Matching refs:test_data
211 def _test_verify(self, test_data, expect_failure=False):
215 succeeds unless |expect_failure|. |test_data| looks like the decoded
218 @param test_data: dictionary of test data to use with the call.
219 @param expect_failure: bool true if test_data should fail to verify.
226 sign_bundle = test_data['sign']
227 unsigned_data = '%s,%s,%s,%s,%s' % (test_data['name'],
228 test_data['ssdp_udn'],
229 test_data['hotspot_bssid'],
230 test_data['public_key'],
236 message.mac_address = test_data['hotspot_bssid']
338 test_data = unicode2str(json.loads(TEST_DATA1))
339 self._test_verify(test_data)
342 test_data = unicode2str(json.loads(TEST_DATA1))
343 test_data['sign']['nonce'] = 'does not match'
344 self._test_verify(test_data, expect_failure=True)
348 test_data = unicode2str(json.loads(TEST_DATA1))
349 test_data['sign']['certificate'] = 'not a certificate'
350 self._test_verify(test_data, expect_failure=True)
354 test_data = unicode2str(json.loads(TEST_DATA2))
355 self._test_verify(test_data, expect_failure=True)
358 test_data = unicode2str(json.loads(TEST_DATA3))
359 self._test_verify(test_data)