def test_vectors_create_multiple(self): v = Vectors(self.gbdx) results = v.create([{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [1.0,1.0] }, "properties": { "text" : "item text", "name" : "item name", "item_type" : "type", "ingest_source" : "source", "attributes" : { "latitude" : 1, "institute_founded" : "2015-07-17", "mascot" : "moth" } } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [1.0,1.0] }, "properties": { "text" : "item text", "name" : "item name", "item_type" : "type", "ingest_source" : "source", "attributes" : { "latitude" : 1, "institute_founded" : "2015-07-17", "mascot" : "asdfadsfadf" } } }]) assert len(results) == 2
def test_vectors_create_single(self): v = Vectors(self.gbdx) results = v.create({ "type": "Feature", "geometry": { "type": "Point", "coordinates": [1.0,1.0] }, "properties": { "text" : "item text", "name" : "item name", "item_type" : "type", "ingest_source" : "source", "attributes" : { "latitude" : 1, "institute_founded" : "2015-07-17", "mascot" : "moth" } } }) for result in results: assert result == '/insight-vector/api/vector/vector-web-s/ce0699f3-bef8-402f-a18e-d149dc2f5f90'