class BaseAnalyzerTestCase(unittest.TestCase):
    def setUp(self):
        self.project = Project.objects.create(url="media/sources/fake-github.tar.gz")
        self.analyzer = BaseAnalyzer(self.project)

    def tearDown(self):
        self.project.delete()

    def test_base_analyzer_get_project_modules_should_return_a_list_of_all_python_module_inside_its(self):
        python_modules = self.analyzer.get_project_modules()

        self.assertEquals(python_modules, ['apps', 'site_media', 'templates'])
        self.analyzer._remove_extracted_code()

    def test_base_analyzer_analyze_should_raises_not_implemented_error(self):
        self.assertRaises(NotImplementedError, self.analyzer.analyze)

    def test_base_analyzer__extract_infos_should_raises_not_implemented_error(self):
        self.assertRaises(NotImplementedError, self.analyzer._extract_infos)
 def setUp(self):
     self.project = Project.objects.create(url="media/sources/fake-github.tar.gz")
     self.analyzer = BaseAnalyzer(self.project)