# Path: stoqdrivers/utils.py
# def get_obj_from_module(module_name, obj_name):
#     module = import_module(module_name)
#     try:
#         return getattr(module, obj_name)
#     except AttributeError:
#         raise ImportError("Can't find class %s for module %s" % (module_name, module_name))


import unittest
from stoqdrivers.utils import get_obj_from_module



class TestUtils(unittest.TestCase):
    def test_get_obj_from_module(self):
        with self.assertRaises(ImportError):

# Path: stoqdrivers/utils.py
# def get_obj_from_module(module_name, obj_name):
#     module = import_module(module_name)
#     try:
#         return getattr(module, obj_name)
#     except AttributeError:
#         raise ImportError("Can't find class %s for module %s" % (module_name, module_name))


# Path: tests/test_utils.py
import unittest
from stoqdrivers.utils import get_obj_from_module




class TestUtils(unittest.TestCase):
    def test_get_obj_from_module(self):
        with self.assertRaises(ImportError):

            get_obj_from_module('stoqdrivers.does.not.exists.I.hope', obj_name='FooBarBaz')