Skip to content

Commit 9910d1e

Browse files
committed
Added the use of local test directories instead of default settings for bluesheet files in the bluesheet upload API test.
- Legacy-Id: 18069
1 parent 3c1c09c commit 9910d1e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

ietf/api/tests.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import json
66
import os
7+
import shutil
78
import sys
89

910
from importlib import import_module
@@ -35,6 +36,14 @@
3536
)
3637

3738
class CustomApiTests(TestCase):
39+
def setUp(self):
40+
self.agenda_path = self.tempdir('materials')
41+
self.saved_agenda_path = settings.AGENDA_PATH
42+
settings.AGENDA_PATH = self.agenda_path
43+
44+
def tearDown(self):
45+
shutil.rmtree(self.agenda_path)
46+
settings.AGENDA_PATH = self.saved_agenda_path
3847

3948
# Using mock to patch the import functions in ietf.meeting.views, where
4049
# api_import_recordings() are using them:
@@ -213,7 +222,6 @@ def test_api_upload_bluesheet(self):
213222

214223
r = self.client.post(url, {'apikey': apikey.hash(), 'meeting': meeting.number, 'group': group.acronym,
215224
'item': '1', 'bluesheet': bluesheet, })
216-
debug.show('bluesheet')
217225
self.assertContains(r, "Done", status_code=200)
218226

219227
bluesheet = session.sessionpresentation_set.filter(document__type__slug='bluesheets').first().document

0 commit comments

Comments
 (0)