class TestDetail(amo.tests.TestCase): def setUp(self): self.webapp = Webapp(name='woo', app_slug='yeah') self.webapp.save() def test_more_url(self): response = self.client.get(self.webapp.get_url_path()) eq_(pq(response.content)('#more-webpage').attr('data-more-url'), self.webapp.get_url_path(more=True))
def test_get_url_path_more(self): webapp = Webapp(app_slug='woo') eq_(webapp.get_url_path(more=True), '/en-US/apps/app/woo/more')
def test_get_url_path(self): webapp = Webapp(app_slug='woo') eq_(webapp.get_url_path(), '/en-US/apps/app/woo/')
class WebappTest(amo.tests.TestCase): def setUp(self): self.webapp = Webapp(name="woo", app_slug="yeah") self.webapp.save() self.url = self.webapp.get_url_path()
def test_get_url_path_more(self): webapp = Webapp(app_slug="woo") eq_(webapp.get_url_path(more=True), "/en-US/apps/app/woo/more")
def test_get_url_path(self): webapp = Webapp(app_slug="woo") eq_(webapp.get_url_path(), "/en-US/apps/app/woo/")