def test_price(self, mock_one, mock_two): mock_url_get("http://price.fakeapi.com", "fake_response") settings["price_link"]["en"] = "http://price.fakeapi.com" settings["price_link"]["ru"] = "http://price.fakeapi.com" response = self.bot.exec(self.fake_context, "price", "anything") self.assertEqual(response, "fake_response") # Test alias `p` works. response = self.bot.exec(self.fake_context, "p", "anything") self.assertEqual(response, "fake_response")
def test_armor(self, mock_one, mock_two): mock_url_get("http://armor.fakeapi.com", "fake_armor") settings["armor_link"]["en"] = "http://armor.fakeapi.com" settings["armor_link"]["ru"] = "http://armor.fakeapi.com" response = self.bot.exec(self.fake_context, "armor", "anything") self.assertEqual(response, "fake_armor")
def test_medical(self, mock_one, mock_two): mock_url_get("http://medical.fakeapi.com", "fake_medical") settings["medical_link"]["en"] = "http://medical.fakeapi.com" settings["medical_link"]["ru"] = "http://medical.fakeapi.com" response = self.bot.exec(self.fake_context, "medical", "anything") self.assertEqual(response, "fake_medical")
def test_wiki(self, mock_one, mock_two): mock_url_get("http://wiki.fakeapi.com", "fake_wiki") settings["wiki_link"]["en"] = "http://wiki.fakeapi.com" settings["wiki_link"]["ru"] = "http://wiki.fakeapi.com" response = self.bot.exec(self.fake_context, "wiki", "anything") self.assertEqual(response, "fake_wiki")
def test_slot(self, mock_one, mock_two): mock_url_get("http://slot.fakeapi.com", "fake_response_slot") settings["slot_link"]["en"] = "http://slot.fakeapi.com" settings["slot_link"]["ru"] = "http://slot.fakeapi.com" response = self.bot.exec(self.fake_context, "slot", "anything") self.assertEqual(response, "fake_response_slot")