Skip to content

Commit 328d9de

Browse files
committed
Provide a test materials directory for the bluesheets tests, to avoid dependency on the local directory setup.
- Legacy-Id: 11818
1 parent 2386fa8 commit 328d9de

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ietf/meeting/tests_views.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,18 @@ def test_finalize_proceedings(self):
12381238
self.assertEqual(meeting.session_set.filter(group__acronym="mars").first().sessionpresentation_set.filter(document__type="draft").first().rev,'00')
12391239

12401240
class BluesheetsTests(TestCase):
1241+
1242+
def setUp(self):
1243+
self.materials_dir = os.path.abspath(settings.TEST_MATERIALS_DIR)
1244+
if not os.path.exists(self.materials_dir):
1245+
os.mkdir(self.materials_dir)
1246+
self.saved_agenda_path = settings.AGENDA_PATH
1247+
settings.AGENDA_PATH = self.materials_dir
1248+
1249+
def tearDown(self):
1250+
settings.AGENDA_PATH = self.saved_agenda_path
1251+
shutil.rmtree(self.materials_dir)
1252+
12411253
def test_upload_blusheets(self):
12421254
session = SessionFactory(meeting__type_id='ietf')
12431255
url = urlreverse('ietf.meeting.views.upload_session_bluesheets',kwargs={'num':session.meeting.number,'session_id':session.id})

0 commit comments

Comments
 (0)