manager: fix site_json field label (#52200)
This commit is contained in:
parent
0676783c13
commit
5130aab946
|
@ -674,7 +674,11 @@ class UserChangeEmailForm(CssClass, FormWithRequest, forms.ModelForm):
|
|||
class SiteImportForm(forms.Form):
|
||||
file_field_label = _('Site Export File')
|
||||
|
||||
site_json = forms.FileField(label=file_field_label)
|
||||
site_json = forms.FileField()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['site_json'].label = self.file_field_label
|
||||
|
||||
def clean_site_json(self):
|
||||
try:
|
||||
|
|
|
@ -59,6 +59,7 @@ def test_manager_ou_import(app, admin, ou1, role_ou1, ou2, role_ou2):
|
|||
|
||||
resp = app.get('/manage/organizational-units/')
|
||||
resp = resp.click('Import')
|
||||
assert 'Organizational Units Export File' in resp.text
|
||||
resp.form['site_json'] = Upload('export.json', json.dumps(export).encode(), 'application/json')
|
||||
resp = resp.form.submit().follow()
|
||||
|
||||
|
|
Loading…
Reference in New Issue