'Using a fake reconstruction of the SVN content repo, test our import
command'

def test_import_command(self):

    fake_svn_path = os.path.join(os.path.dirname(__file__), 'fake_svn_content_checkout')
    with self.settings(PYTHON_ORG_CONTENT_SVN_PATH=None):
        with self.assertRaises(ImproperlyConfigured):
            call_command('import_pages_from_svn')
    with self.settings(PYTHON_ORG_CONTENT_SVN_PATH=fake_svn_path):
        call_command('import_pages_from_svn')
    self.assertEqual(Page.objects.count(), 3)
    self.assertTrue(Page.objects.get(path='about'))
    self.assertTrue(Page.objects.get(path='community'))
