test fixes
This commit is contained in:
Родитель
fda947cd19
Коммит
d54e4fbafe
|
@ -173,7 +173,8 @@ class APITest(TestCase):
|
|||
"""<guid>{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}</guid>""")
|
||||
self.assertContains(response, "<version>2.1.072</version>")
|
||||
self.assertContains(response, """<status id="4">Public</status>""")
|
||||
self.assertContains(response, '<author>55021</author>')
|
||||
self.assertContains(response,
|
||||
u'<author>55021 \u0627\u0644\u062a\u0637\u0628</author>')
|
||||
self.assertContains(response, "<summary>Delicious Bookmarks is the")
|
||||
self.assertContains(response, "<description>This extension integrates")
|
||||
|
||||
|
|
|
@ -179,7 +179,8 @@ class FrontendSearchTest(SphinxTestCase):
|
|||
are returning them."""
|
||||
resp = self.get_response(q='grapple')
|
||||
doc = pq(resp.content)
|
||||
eq_('GrApple Yummy Aronnax', doc('.item h3 a').text())
|
||||
eq_(u'GrApple Yummy Aronnax \u0627\u0644\u062a\u0637\u0628',
|
||||
doc('.item h3 a').text())
|
||||
|
||||
def test_tag_refinement(self):
|
||||
"""Don't show the tag list if there's no tags to be shown."""
|
||||
|
@ -238,7 +239,6 @@ class ViewTest(test_utils.TestCase):
|
|||
assert views._get_tags(self.fake_request, tags=[t], selected='yermom')
|
||||
|
||||
|
||||
|
||||
class AjaxTest(SphinxTestCase):
|
||||
fixtures = ('base/addon_3615',)
|
||||
|
||||
|
@ -253,8 +253,7 @@ class AjaxTest(SphinxTestCase):
|
|||
('id', addon.id),
|
||||
('icon', addon.icon_url),
|
||||
('label', unicode(addon.name)),
|
||||
('value', unicode(addon.name).lower())
|
||||
)
|
||||
('value', unicode(addon.name).lower()))
|
||||
|
||||
for val, expected in check_me:
|
||||
check(val, expected)
|
||||
|
@ -264,5 +263,3 @@ class AjaxTest(SphinxTestCase):
|
|||
searchclient.side_effect = SearchError()
|
||||
r = self.client.get(reverse('search.ajax') + '?q=del')
|
||||
eq_('[]', r.content)
|
||||
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ class UserProfile(amo.models.ModelBase):
|
|||
return self._reviews_all.filter(reply_to=None)
|
||||
|
||||
def anonymize(self):
|
||||
log.info("User (%s: <%s>) is being anonymized." % (self, self.email))
|
||||
log.info(u"User (%s: <%s>) is being anonymized." % (self, self.email))
|
||||
self.email = ""
|
||||
self.password = "sha512$Anonymous$Password"
|
||||
self.firstname = ""
|
||||
|
|
|
@ -35,7 +35,7 @@ class TestAjax(UserViewBase):
|
|||
r = self.client.get(url, follow=True)
|
||||
data = json.loads(r.content)
|
||||
eq_(data['id'], 9945)
|
||||
eq_(data['name'], 'Justin Scott')
|
||||
eq_(data['name'], u'Justin Scott \u0627\u0644\u062a\u0637\u0628')
|
||||
|
||||
def test_forbidden(self):
|
||||
url = reverse('users.ajax')
|
||||
|
|
Загрузка…
Ссылка в новой задаче