Fix cli for python 2.6

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin 2014-07-15 12:59:25 -07:00
commit 779f4bda01
4 changed files with 28 additions and 14 deletions

View file

@ -1,9 +1,13 @@
from __future__ import unicode_literals
from __future__ import absolute_import
import logging
import os
from .. import unittest
from fig.cli import main
from fig.cli.main import TopLevelCommand
from fig.packages.six import StringIO
import os
class CLITestCase(unittest.TestCase):
def test_default_project_name(self):
@ -35,3 +39,8 @@ class CLITestCase(unittest.TestCase):
command = TopLevelCommand()
with self.assertRaises(SystemExit):
command.dispatch(['-h'], None)
def test_setup_logging(self):
main.setup_logging()
self.assertEqual(logging.getLogger().level, logging.DEBUG)
self.assertEqual(logging.getLogger('requests').propagate, False)