Пример #1
0
 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})
Пример #2
0
 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})
Пример #3
0
    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)
Пример #4
0
    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)