Skip to content

Commit

Permalink
Тест на корректность файлов (проверка на опечатки и недоделки)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuego committed Oct 2, 2016
1 parent 4d154da commit 579adca
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions tests/test_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# coding: utf-8
from __future__ import unicode_literals, absolute_import

from unittest import TestCase
from importlib import import_module
import types


class TestImports(TestCase):

def _import(self, path):
return import_module(path)

def test_fields(self):
self.assertIsInstance(self._import('fias.fields'), types.ModuleType)

def test_importer_source(self):
self.assertIsInstance(self._import('fias.importer.source'), types.ModuleType)

def test_importer_table(self):
self.assertIsInstance(self._import('fias.importer.table'), types.ModuleType)

def test_importer(self):
self.assertIsInstance(self._import('fias.importer'), types.ModuleType)

def test_management_fias(self):
self.assertIsInstance(self._import('fias.management.commands.fias'), types.ModuleType)

def test_management_fias_suggest(self):
self.assertIsInstance(self._import('fias.management.commands.fias_suggest'), types.ModuleType)

def test_management_fiasinfo(self):
self.assertIsInstance(self._import('fias.management.commands.fiasinfo'), types.ModuleType)

def test_models(self):
self.assertIsInstance(self._import('fias.models'), types.ModuleType)

def test_suggest(self):
self.assertIsInstance(self._import('fias.suggest'), types.ModuleType)

def test_suggest_backend_noop(self):
self.assertIsInstance(self._import('fias.suggest.backends.noop'), types.ModuleType)

def test_suggest_backend_sphinx(self):
self.assertIsInstance(self._import('fias.suggest.backends.sphinx'), types.ModuleType)

def test_admin(self):
self.assertIsInstance(self._import('fias.admin'), types.ModuleType)

def test_forms(self):
self.assertIsInstance(self._import('fias.forms'), types.ModuleType)

def test_routers(self):
self.assertIsInstance(self._import('fias.routers'), types.ModuleType)

def test_views(self):
self.assertIsInstance(self._import('fias.views'), types.ModuleType)

0 comments on commit 579adca

Please sign in to comment.