Fixed bugs in the previous commit (in the tests).
- Legacy-Id: 11142
This commit is contained in:
parent
304516f4b3
commit
8769cc0207
|
@ -1,13 +1,11 @@
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from pyquery import PyQuery
|
from pyquery import PyQuery
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import reverse as urlreverse
|
from django.core.urlresolvers import reverse as urlreverse
|
||||||
from django.core.management import call_command
|
|
||||||
|
|
||||||
import debug # pyflakes:ignore
|
import debug # pyflakes:ignore
|
||||||
|
|
||||||
|
@ -59,7 +57,9 @@ class SubmitTests(TestCase):
|
||||||
shutil.rmtree(self.staging_dir)
|
shutil.rmtree(self.staging_dir)
|
||||||
shutil.rmtree(self.repository_dir)
|
shutil.rmtree(self.repository_dir)
|
||||||
shutil.rmtree(self.archive_dir)
|
shutil.rmtree(self.archive_dir)
|
||||||
shutil.rmtree(self.yang_model_dir)
|
shutil.rmtree(self.yang_rfc_model_dir)
|
||||||
|
shutil.rmtree(self.yang_draft_model_dir)
|
||||||
|
shutil.rmtree(self.yang_inval_model_dir)
|
||||||
settings.IDSUBMIT_STAGING_PATH = self.saved_idsubmit_staging_path
|
settings.IDSUBMIT_STAGING_PATH = self.saved_idsubmit_staging_path
|
||||||
settings.INTERNET_DRAFT_PATH = self.saved_internet_draft_path
|
settings.INTERNET_DRAFT_PATH = self.saved_internet_draft_path
|
||||||
settings.IDSUBMIT_REPOSITORY_PATH = self.saved_idsubmit_repository_path
|
settings.IDSUBMIT_REPOSITORY_PATH = self.saved_idsubmit_repository_path
|
||||||
|
@ -255,15 +255,6 @@ class SubmitTests(TestCase):
|
||||||
def test_submit_new_wg_txt(self):
|
def test_submit_new_wg_txt(self):
|
||||||
self.submit_new_wg(["txt"])
|
self.submit_new_wg(["txt"])
|
||||||
|
|
||||||
# Test yang module extraction management command
|
|
||||||
saved_sys_stdout = sys.stdout
|
|
||||||
sys.stdout = StringIO()
|
|
||||||
call_command('populate_yang_model_dirs')
|
|
||||||
self.assertIn('Extracting to', sys.stdout.getvalue())
|
|
||||||
sys.stdout.close()
|
|
||||||
sys.stdout = saved_sys_stdout
|
|
||||||
self.assertTrue(os.path.exists(os.path.join(settings.YANG_DRAFT_MODEL_DIR, "ietf-mpls@2015-10-16.yang")))
|
|
||||||
|
|
||||||
def text_submit_new_wg_xml(self):
|
def text_submit_new_wg_xml(self):
|
||||||
self.submit_new_wg(["xml"])
|
self.submit_new_wg(["xml"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue