More tests, few small fixes.

This commit is contained in:
2014-08-14 18:46:47 +01:00
parent 62d50cfbfe
commit 5f10160494
4 changed files with 36 additions and 5 deletions

23
tests/test_bot.py Normal file
View File

@@ -0,0 +1,23 @@
from unittest import TestCase
from dropbot.bot import DropBot
class DropBotTestCase(TestCase):
def setUp(self):
self.bot = DropBot('test@test.com', 'testpassword')
def test_simple_bot(self):
self.assertIsNotNone(self.bot)
def test_system_picker(self):
self.assertEquals(self.bot._system_picker('Jita'), 30000142)
self.assertEquals(self.bot._system_picker('Jit'), 30000142)
self.assertIs(type(self.bot._system_picker('J')), str)
self.assertEqual(self.bot._system_picker('J'), 'More than 10 systems match J, please provide a more complete name')
self.assertEqual(self.bot._system_picker('GE-'), 'Did you mean: GGE-5Q, GE-94X, GE-8JV, IGE-NE, IGE-RI?')
self.assertEqual(self.bot._system_picker('asdasd'), 'No systems found matching asdasd')
def test_get_evecentral_price(self):
self.assertIs(self.bot._get_evecentral_price(1,1), None)
self.assertIs(type(self.bot._get_evecentral_price(22430, 30000142)), tuple)