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