def test__bp_static_url(self): """ Tests test__bp_static_url """ bps = [Mock(static_url_path='/foo', url_prefix=None), Mock(static_url_path=None, url_prefix='/pref'), Mock(static_url_path='/b/bar', url_prefix='/pref'), Mock(static_url_path=None, url_prefix=None)] expected = [six.u('/foo'), six.u('/pref'), six.u('/pref/b/bar'), six.u('')] self.assertEquals(expected, [flask_s3._bp_static_url(x) for x in bps])
def test__bp_static_url(self): """ Tests test__bp_static_url """ bps = [Mock(static_url_path='/foo', url_prefix=None), Mock(static_url_path=None, url_prefix='/pref'), Mock(static_url_path='/b/bar', url_prefix='/pref'), Mock(static_url_path=None, url_prefix=None)] expected = [u'/foo', u'/pref', u'/pref/b/bar', u''] self.assertEquals(expected, [flask_s3._bp_static_url(x) for x in bps])
def test__bp_static_url(self): """ Tests test__bp_static_url """ bps = [ Mock(static_url_path="/foo", url_prefix=None), Mock(static_url_path=None, url_prefix="/pref"), Mock(static_url_path="/b/bar", url_prefix="/pref"), Mock(static_url_path=None, url_prefix=None), ] expected = [u"/foo", u"/pref", u"/pref/b/bar", u""] self.assertEquals(expected, [flask_s3._bp_static_url(x) for x in bps])