def test_add_batch(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/add-batch-success.yaml"):
         constructor = ConstructorIO(**HTTPS_ARGS)
         items = [{"item_name": "new item1"}, {"item_name": "new_item2"}]
         resp = constructor.add_batch(
             items=items,
             autocomplete_section="Search Suggestions",
         )
     assert resp is True
예제 #2
0
 def test_add_batch(self):
     with my_vcr.use_cassette(
             "fixtures/ac.cnstrc.com/add-batch-success.yaml"):
         constructor = ConstructorIO(**HTTPS_ARGS)
         items = [{"item_name": "new item1"}, {"item_name": "new_item2"}]
         resp = constructor.add_batch(
             items=items,
             autocomplete_section="Search Suggestions",
         )
     assert resp is True
 def test_add_batch(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/add-batch-success.yaml"):
         constructor = ConstructorIO(api_token='apiToken',
                                     autocomplete_key='autocompleteKey',
                                     protocol="https",
                                     host="ac.cnstrc.com")
         items = [{"item_name": "new item"}, {"item_name": "new_item2"}]
         resp = constructor.add_batch(
             items=items,
             autocomplete_section="Search Suggestions",
         )
     assert resp == True
 def test_add_batch(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/add-batch-success.yaml"):
         constructor = ConstructorIO(
             api_token = 'apiToken',
             autocomplete_key = 'autocompleteKey',
             protocol = "https",
             host = "ac.cnstrc.com"
         )
         items = [{"item_name": "new item"}, {"item_name": "new_item2"}]
         resp = constructor.add_batch(
             items = items,
             autocomplete_section = "Search Suggestions",
         )
     assert resp == True