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')
Esempio 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)
Esempio 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)
Esempio n. 4
0
 def get(self, serviceName, pointId):
     newPoint = getPointById(serviceName, pointId)
     return newPoint
Esempio n. 5
0
 def get(self, serviceName, pointId):
     newPoint = getPointById(serviceName, pointId)
     return newPoint