@@ -0,0 +1,1911 @@
+import unittest%0Afrom unittest import mock%0Aimport requests%0Afrom tests import PluginTest%0Afrom plugins.cocktail import Cocktail%0Aimport random%0A%0A%0Aclass CocktailTest(PluginTest):%0A    def setUp(self):%0A        self.test = self.load_plugin(Cocktail)%0A        self.test.jarvis = self.jarvis_api%0A    %0A    def test_available_cocktail_ingridients(self):%0A        available_ingridients = self.test.ingridients%0A        for i in available_ingridients:%0A            response = requests.get(%0A                f%22https://www.thecocktaildb.com/api/json/v1/1/filter.php?i=%7Bi%7D%22)%0A            self.assertTrue(response.ok)%0A%0A    def test_sample_cocktails_by_ingridient(self):%0A        # Test  Random Ingridient's Cocktails%0A        available_ingridients = self.test.ingridients%0A        random_base_ingridient = random.randint(0,len(available_ingridients) - 1)%0A        cocktails = self.test.get_cocktails_by_ingridient(random_base_ingridient)%0A        for c in cocktails:%0A            response = requests.get(%0A                f%22https://www.thecocktaildb.com/api/json/v1/1/filter.php?i=%7Bc%7D%22)%0A            self.assertTrue(response.ok)%0A%0A    def test_is_out_of_range_true(self):%0A        with self.assertRaises(Exception):%0A            self.queue_input(%22700%22)%0A            selected_ingridient = self.test.get_ingridient(self.jarvis_api)%0A        with self.assertRaises(Exception):%0A            self.queue_input(%22-10%22)%0A            selected_ingridient = self.test.get_ingridient(self.jarvis_api)%0A%0A    def test_is_out_of_range_false(self):%0A        available_ingridients = self.test.ingridients%0A        self.queue_input(%2210%22)%0A        selected_ingridient = self.test.get_ingridient()%0A        self.assertEqual(available_ingridients%5Bselected_ingridient%5D,available_ingridients%5B10%5D)%0A        self.queue_input(%223%22)%0A        selected_ingridient = self.test.get_ingridient()%0A        self.assertEqual(selected_ingridient, 3)%0A%0Aif __name__ == '__main__':%0A    unittest.main()

Add tests for cocktail.py