@@ -123,7 +123,7 @@ def test_validate_article(self):
123
123
124
124
f = BlogSearchForm ()
125
125
f .search ()
126
- self .client .login (username = 'liangliangyy' , password = 'liangliangyy' )
126
+ # self.client.login(username='liangliangyy', password='liangliangyy')
127
127
from DjangoBlog .spider_notify import SpiderNotify
128
128
SpiderNotify .baidu_notify ([article .get_full_url ()])
129
129
@@ -149,7 +149,9 @@ def test_validate_article(self):
149
149
self .assertEqual (response .status_code , 200 )
150
150
from DjangoBlog .utils import block_code
151
151
block = block_code ("`python`" , 'python' )
152
-
152
+ self .client .get ("/admin/blog/article/1/delete/" )
153
+ self .client .get ('/admin/servermanager/emailsendlog/' )
154
+ self .client .get ('admin/admin/logentry/' )
153
155
154
156
def __check_pagination__ (self , p , type , value ):
155
157
s = load_pagination_info (p .page (1 ), type , value )
@@ -182,18 +184,12 @@ def test_image(self):
182
184
form_data = {'python.png' : imgfile }
183
185
rsp = self .client .post (
184
186
'/upload?sign=' + sign , form_data , follow = True )
185
-
186
187
self .assertEqual (rsp .status_code , 200 )
188
+ os .remove (imagepath )
187
189
from DjangoBlog .utils import save_user_avatar , send_email
188
190
send_email ([
'[email protected] ' ],
'testTitle' ,
'testContent' )
189
191
save_user_avatar (
190
192
'https://www.python.org/static/img/[email protected] ' )
191
- """
192
- data = SimpleUploadedFile(imagepath, b'file_content', content_type='image/jpg')
193
- rsp = self.client.post('/upload', {'django.jpg': data})
194
- self.assertEqual(rsp.status_code, 200)
195
- SimpleUploadedFile()
196
- """
197
193
198
194
def test_errorpage (self ):
199
195
rsp = self .client .get ('/eee' )
0 commit comments