Skip to content

Commit ea6d828

Browse files
committed
Avoiding an initialization problem by setting NOMCOM_PUBLIC_KEYS_DIR in settings_sqlitetest. This is not the best long term fix
- Legacy-Id: 10581
1 parent 6574618 commit ea6d828

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

ietf/nomcom/factories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Meta:
8484

8585
group = factory.SubFactory(GroupFactory,type_id='nomcom')
8686

87-
public_key = factory.django.FileField(data=cert,storage=FileSystemStorage(location=settings.NOMCOM_PUBLIC_KEYS_DIR))
87+
public_key = factory.django.FileField(data=cert)
8888

8989
@factory.post_generation
9090
def populate_positions(self, create, extracted, **kwargs):

ietf/nomcom/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ class FeedbackLastSeenTests(TestCase):
11161116

11171117
def setUp(self):
11181118
build_test_public_keys_dir(self)
1119-
self.nc = NomComFactory.create(**nomcom_kwargs_for_year(group__state_id='conclude'))
1119+
self.nc = NomComFactory.create(**nomcom_kwargs_for_year())
11201120
self.author = PersonFactory.create().email_set.first().address
11211121
self.member = self.nc.group.role_set.filter(name='member').first().person
11221122
self.nominee = self.nc.nominee_set.first()
@@ -1187,7 +1187,7 @@ class NewActiveNomComTests(TestCase):
11871187

11881188
def setUp(self):
11891189
build_test_public_keys_dir(self)
1190-
self.nc = NomComFactory.create(**nomcom_kwargs_for_year(group__state_id='conclude'))
1190+
self.nc = NomComFactory.create(**nomcom_kwargs_for_year())
11911191
self.chair = self.nc.group.role_set.filter(name='chair').first().person
11921192

11931193
def tearDown(self):

ietf/settings_sqlitetest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# ./manage.py test --settings=settings_sqlitetest doc.ChangeStateTestCase
66
#
77

8+
import io
89
from settings import * # pyflakes:ignore
910

1011
# Workaround to avoid spending minutes stepping through the migrations in
@@ -38,4 +39,5 @@ def __getitem__(self, item):
3839

3940
if TEST_CODE_COVERAGE_CHECKER and not TEST_CODE_COVERAGE_CHECKER._started:
4041
TEST_CODE_COVERAGE_CHECKER.start()
41-
42+
43+
NOMCOM_PUBLIC_KEYS_DIR=os.path.abspath("tmp-nomcom-public-keys-dir")

0 commit comments

Comments
 (0)