def testValidSRJBoolean(self): for value in (True, False): data = ''.join(SRJSerializer(value)) try: data = json.loads(data) except Exception, e: raise AssertionError(e) self.assertEqual(data, {'head': {}, 'boolean': value})
def testValidSRJResultSet(self): data = ''.join(SRJSerializer(TEST_RESULTSET)) target_data_filename = os.path.join(imp.find_module('humfrey')[1], 'tests', 'data', 'linkeddata', 'srj_resultset.json') with open(target_data_filename, 'rb') as json_file: target_data = json.load(json_file) try: data = json.loads(data) except Exception, e: raise AssertionError(e)
def testValidSRJResultSet(self): data = ''.join(SRJSerializer(TEST_RESULTSET)) target_data_filename = os.path.join( imp.find_module('humfrey')[1], 'tests', 'data', 'linkeddata', 'srj_resultset.json') with open(target_data_filename, 'rb') as json_file: target_data = json.load(json_file) try: data = json.loads(data) except Exception, e: raise AssertionError(e)