def test_upload_mediaplan(self): campaign = Campaign.objects.get(pk=1) filename = 'attachment.xls' path = get_upload_to(campaign, filename) self.failIfEqual(filename, path) FILE_RE = re.compile('^%s/%s/attachment.xls$' % ( str(campaign._meta.app_label), str(campaign._meta.module_name))) self.failUnless(FILE_RE.search(path))
def test_upload_mediaplan(self): campaign = Campaign.objects.get(pk=1) filename = 'attachment.xls' path = get_upload_to(campaign, filename) self.failIfEqual(filename, path) FILE_RE = re.compile( '^%s/%s/attachment.xls$' % (str(campaign._meta.app_label), str(campaign._meta.module_name))) self.failUnless(FILE_RE.search(path))
def test_upload_logo(self): client = Client.objects.get(pk=1) filename = 'logo.png' path = get_upload_to(client, filename) self.failIfEqual(filename, path) FILE_RE = re.compile('^%(filepath)s/logo.png$' % {'filepath': '%s/%s' % ( str(client._meta.app_label), str(client._meta.module_name))}) self.failUnless(FILE_RE.search(path))
def test_upload_file(self): version = Version.objects.get(pk=1) filename = 'banner.swf' path = get_upload_to(version, filename) self.failIfEqual(filename, path) FILE_RE = re.compile('^%(filepath)s/banner.swf$' % {'filepath': '%s/%s' % ( str(version._meta.app_label), str(version._meta.module_name))}) self.failUnless(FILE_RE.search(path))
def test_upload_logo(self): client = Client.objects.get(pk=1) filename = 'logo.png' path = get_upload_to(client, filename) self.failIfEqual(filename, path) FILE_RE = re.compile( '^%(filepath)s/logo.png$' % { 'filepath': '%s/%s' % (str(client._meta.app_label), str(client._meta.module_name)) }) self.failUnless(FILE_RE.search(path))
def test_upload_file(self): version = Version.objects.get(pk=1) filename = 'banner.swf' path = get_upload_to(version, filename) self.failIfEqual(filename, path) FILE_RE = re.compile( '^%(filepath)s/banner.swf$' % { 'filepath': '%s/%s' % (str(version._meta.app_label), str(version._meta.module_name)) }) self.failUnless(FILE_RE.search(path))