Unit tests now start their own Redis.

This commit is contained in:
Luke Sneeringer
2014-11-14 11:57:26 -06:00
parent 825d996316
commit 3d51b25762
7 changed files with 55 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ TEST_SIMPLE_INVENTORY_SCRIPT = "#!/usr/bin/env python\nimport json\nprint json.d
class InventoryTest(BaseTest):
def setUp(self):
self.start_redis()
super(InventoryTest, self).setUp()
self.setup_users()
self.organizations = self.make_organizations(self.super_django_user, 3)
@@ -47,6 +47,10 @@ class InventoryTest(BaseTest):
permission_type = 'read'
)
def tearDown(self):
super(InventoryTest, self).tearDown()
self.stop_redis()
def test_get_inventory_list(self):
url = reverse('api:inventory_list')
qs = Inventory.objects.filter(active=True).distinct()