s/collection_id/collection/ in URLS and fix a broken test
This commit is contained in:
Родитель
76b3e3c8cb
Коммит
93b5d670b4
|
@ -170,7 +170,7 @@ class InstallButton(object):
|
|||
if self.src:
|
||||
url = urlparams(url, src=self.src)
|
||||
if self.collection:
|
||||
url = urlparams(url, collection_id=self.collection.uuid)
|
||||
url = urlparams(url, collection=self.collection.uuid)
|
||||
return url
|
||||
|
||||
|
||||
|
|
|
@ -321,10 +321,10 @@ class TestButton(ButtonTest):
|
|||
collection = Mock()
|
||||
collection.uuid = 'xxx'
|
||||
b = self.get_button(collection=collection)
|
||||
eq_(b.fix_link('foo.com'), 'foo.com?collection_id=xxx')
|
||||
eq_(b.fix_link('foo.com'), 'foo.com?collection=xxx')
|
||||
|
||||
b = self.get_button(collection=collection, src='src')
|
||||
eq_(b.fix_link('foo.com'), 'foo.com?src=src&collection_id=xxx')
|
||||
eq_(b.fix_link('foo.com'), 'foo.com?src=src&collection=xxx')
|
||||
|
||||
def test_links(self):
|
||||
self.version.all_files = self.platform_files
|
||||
|
|
|
@ -256,6 +256,12 @@ class BlacklistedNickname(amo.models.ModelBase):
|
|||
class PersonaAuthor(unicode):
|
||||
"""Stub user until the persona authors get imported."""
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""I don't want to change code depending on PersonaAuthor.id, so I'm
|
||||
just hardcoding 0. The only code using this is flush_urls."""
|
||||
return 0
|
||||
|
||||
@property
|
||||
def display_name(self):
|
||||
return self
|
||||
|
|
Загрузка…
Ссылка в новой задаче