forked from expo/troggle
fixed test mistake & bug in Edit This
This commit is contained in:
@@ -91,9 +91,9 @@ class PostTests(TestCase):
|
||||
content = response.content.decode()
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, HTTPStatus.OK)
|
||||
with open('test_up.html', 'w') as f:
|
||||
f.write(content)
|
||||
t = re.search('<em>\'README', content)
|
||||
# with open('test_up.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search('<em>README', content)
|
||||
self.assertIsNotNone(t, 'Logged in but failed to see "<em>\'README"' )
|
||||
t = re.search(' saved as', content)
|
||||
self.assertIsNotNone(t, 'Logged in but failed to see "File(s) saved as"' )
|
||||
|
||||
@@ -135,7 +135,7 @@ def expowebpage(request, expowebpath, path):
|
||||
title, = m.groups()
|
||||
else:
|
||||
title = ""
|
||||
m = re.search(r"<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE)
|
||||
m = re.search(r"^<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE)
|
||||
if m:
|
||||
editable = False
|
||||
else:
|
||||
@@ -325,6 +325,4 @@ class ExpoPageForm(forms.Form):
|
||||
'''The form used by the editexpopage function
|
||||
'''
|
||||
title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'}))
|
||||
|
||||
#html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 20}))
|
||||
html = forms.CharField(widget=forms.Textarea(attrs={"cols":80, "rows":20}))
|
||||
|
||||
Reference in New Issue
Block a user