def test_remove(self): with my_vcr.use_cassette("fixtures/ac.cnstrc.com/remove-success.yaml"): constructor = ConstructorIO(**HTTPS_ARGS) resp = constructor.remove( item_name="boinkamoinka", autocomplete_section="Search Suggestions") assert resp is True
def test_remove(self): with vcr.use_cassette("fixtures/ac.cnstrc.com/remove-success.yaml"): constructor = ConstructorIO(**HTTPS_ARGS) resp = constructor.remove( item_name="racer", autocomplete_section="Search Suggestions" ) assert resp is True
def test_remove(self): with vcr.use_cassette("fixtures/ac.cnstrc.com/remove-success.yaml"): constructor = ConstructorIO(api_token="apiToken", autocomplete_key="autocompleteKey", protocol="http", host="ac.cnstrc.com") resp = constructor.remove( item_name="racer", autocomplete_section="Search Suggestions") assert resp == True
def test_add_remove_metadata(self): with my_vcr.use_cassette( "fixtures/ac.cnstrc.com/add-metadata-success.yaml"): constructor = ConstructorIO(**HTTPS_ARGS) resp = constructor.add(item_name="Metadata Example", autocomplete_section="Products", url="https://metadata.example", metadata={"this_key": "this_value"}) assert resp is True resp = constructor.remove(item_name="Metadata Example", autocomplete_section="Products") assert resp is True
def test_remove(self): with vcr.use_cassette("fixtures/ac.cnstrc.com/remove-success.yaml"): constructor = ConstructorIO( api_token = "apiToken", autocomplete_key = "autocompleteKey", protocol = "http", host = "ac.cnstrc.com" ) resp = constructor.remove( item_name = "racer", autocomplete_section = "Search Suggestions" ) assert resp == True
def test_modify(self): with my_vcr.use_cassette("fixtures/ac.cnstrc.com/modify-success.yaml"): constructor = ConstructorIO(**HTTPS_ARGS) resp = constructor.add(item_name="Stanley_Steamer", autocomplete_section="Search Suggestions") assert resp is True resp = constructor.modify( item_name="Stanley_Steamer", new_item_name="Newer_Stanley_Steamer", suggested_score=100, autocomplete_section="Search Suggestions") assert resp is True # clean things up so that when we re-run the test we don't # get an error when we add it resp = constructor.remove( item_name="Newer_Stanley_Steamer", autocomplete_section="Search Suggestions") assert resp is True