Ejemplo n.º 1
0
 def testGetPointById(self):
     db = getDbObject(DB)
     obj_id = db[COLLECTION].save({NAME: 'test_GT_1304'})
     with self.assertRaises(PointDoesNotExist):
         getPointById('testservice', '111111111111111111111111')
     obj = getPointById('testservice', obj_id)
     self.assertEqual(obj['name'], 'test_GT_1304')
Ejemplo n.º 2
0
    def testJsonLDConversion(self):
        TEST_POINT = getPointById(TEST_SERVICE, TEST_POINT_ID)
        convertedPoint = convertPointToJsonLD(TEST_POINT)
        self.assertEquals(convertedPoint, VALID_POINT)

        TEST_LIST = [TEST_POINT]
        convertedList = convertPointsToJsonLD(TEST_LIST)
        self.assertEquals(convertedList, VALID_LIST)
Ejemplo n.º 3
0
    def testJsonLDConversion(self):
        TEST_POINT = getPointById(TEST_SERVICE, TEST_POINT_ID)
        convertedPoint = convertPointToJsonLD(TEST_POINT)
        self.assertEquals(convertedPoint, VALID_POINT)

        TEST_LIST = [TEST_POINT]
        convertedList = convertPointsToJsonLD(TEST_LIST)
        self.assertEquals(convertedList, VALID_LIST)
Ejemplo n.º 4
0
 def get(self, serviceName, pointId):
     newPoint = getPointById(serviceName, pointId)
     return newPoint
Ejemplo n.º 5
0
 def get(self, serviceName, pointId):
     newPoint = getPointById(serviceName, pointId)
     return newPoint