def test_modify(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/modify-success.yaml"):
         constructor = ConstructorIO(**HTTPS_ARGS)
         resp = constructor.modify(
             item_name="Stanley_Steamer",
             new_item_name="Newer_Stanley_Steamer",
             suggested_score=100,
             autocomplete_section="Search Suggestions"
         )
         assert resp is True
 def test_modify(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/modify-success.yaml"):
         constructor = ConstructorIO(api_token="apiToken",
                                     autocomplete_key="autocompleteKey",
                                     protocol="http",
                                     host="ac.cnstrc.com")
         resp = constructor.modify(
             item_name="Stanley_Steamer",
             new_item_name="Newer_Stanley_Steamer",
             suggested_score=100,
             autocomplete_section="Search Suggestions")
         assert resp == True
 def test_modify(self):
     with vcr.use_cassette("fixtures/ac.cnstrc.com/modify-success.yaml"):
         constructor = ConstructorIO(
             api_token = "apiToken",
             autocomplete_key = "autocompleteKey",
             protocol = "http",
             host = "ac.cnstrc.com"
         )
         resp = constructor.modify(
             item_name = "Stanley_Steamer",
             new_item_name = "Newer_Stanley_Steamer",
             suggested_score = 100,
             autocomplete_section = "Search Suggestions"
         )
         assert resp == True
Exemplo n.º 4
0
    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