Example #1
0
    def test_remove(self):
        print("\n")
        log("Starting test")
        #Add item
        title = "Test remove"
        url = "http://apa.com"

        fav_id = fm.add(title, url)
        self.assertIsNotNone(fm.get(fav_id), "Could not retrieve item!")

        # Remove item
        removed = fm.remove(fav_id)
        self.assertTrue(removed, "Item could not be removed!")
        self.assertIsNone(fm.get(fav_id), "Item is still in collection!")
Example #2
0
    def test_remove(self):
        print ("\n")
        log("Starting test")
        # Add item
        title = "Test remove"
        url = "http://apa.com"

        fav_id = fm.add(title, url)
        self.assertIsNotNone(fm.get(fav_id), "Could not retrieve item!")

        # Remove item
        removed = fm.remove(fav_id)
        self.assertTrue(removed, "Item could not be removed!")
        self.assertIsNone(fm.get(fav_id), "Item is still in collection!")
Example #3
0
    def test_get(self):
        print("\n")
        log("Starting test")
        # Add item
        title = "Test get"
        url = "http://apa.com"
        fav_id = fm.add(title, url)

        # Get item
        fav_obj = fm.get(fav_id)
        self.assertIsNotNone(fav_obj, "Could not retrieve item!")
        fav_obj = None
        fav_obj = fm.get_by_title(title)
        self.assertIsNotNone(fav_obj, "Could not retrieve item!")
Example #4
0
    def test_get(self):
        print ("\n")
        log("Starting test")
        # Add item
        title = "Test get"
        url = "http://apa.com"
        fav_id = fm.add(title, url)

        # Get item
        fav_obj = fm.get(fav_id)
        self.assertIsNotNone(fav_obj, "Could not retrieve item!")
        fav_obj = None
        fav_obj = fm.get_by_title(title)
        self.assertIsNotNone(fav_obj, "Could not retrieve item!")