Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 609764 Details for
Bug 854333
Review Request: python-transifex - Python API to transifex
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix unittests for change in slug exceptions
0001-Fix-invalid-slug-unittests-for-new-exception.patch (text/plain), 2.41 KB, created by
Toshio Ernie Kuratomi
on 2012-09-04 19:11:50 UTC
(
hide
)
Description:
Fix unittests for change in slug exceptions
Filename:
MIME Type:
Creator:
Toshio Ernie Kuratomi
Created:
2012-09-04 19:11:50 UTC
Size:
2.41 KB
patch
obsolete
>From b41bb2be1f5133e978957650208f29142a02da0b Mon Sep 17 00:00:00 2001 >From: Toshio Kuratomi <toshio@fedoraproject.org> >Date: Tue, 4 Sep 2012 12:03:03 -0700 >Subject: [PATCH 1/2] Fix invalid slug unittests for new exception > >--- > transifex/tests/api.py | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/transifex/tests/api.py b/transifex/tests/api.py >index 0df5f05..1a05d3c 100644 >--- a/transifex/tests/api.py >+++ b/transifex/tests/api.py >@@ -2,7 +2,7 @@ from unittest import TestCase > from transifex.api import TransifexAPI > from mock import patch, Mock, MagicMock > import json >-from transifex.exceptions import TransifexAPIException >+from transifex.exceptions import InvalidSlugException, TransifexAPIException > import StringIO > import requests > from requests.models import Response >@@ -40,13 +40,13 @@ class TransifexAPITest(TestCase): > """ > Test the `new_project` api call when the slug is invalid > """ >- self.assertRaises(TransifexAPIException, self.api.new_project, >+ self.assertRaises(InvalidSlugException, self.api.new_project, > slug='.' > ) >- self.assertRaises(TransifexAPIException, self.api.new_project, >+ self.assertRaises(InvalidSlugException, self.api.new_project, > slug='/' > ) >- self.assertRaises(TransifexAPIException, self.api.new_project, >+ self.assertRaises(InvalidSlugException, self.api.new_project, > slug='%@$' > ) > >@@ -180,13 +180,13 @@ class TransifexAPITest(TestCase): > mock_open.return_value = MagicMock(spec=file) > mock_open.return_value.read = lambda: file_contents > >- self.assertRaises(TransifexAPIException, self.api.new_resource, >+ self.assertRaises(InvalidSlugException, self.api.new_resource, > project_slug='aaa', resource_slug='.', path_to_pofile='/aaa/file.po' > ) >- self.assertRaises(TransifexAPIException, self.api.new_resource, >+ self.assertRaises(InvalidSlugException, self.api.new_resource, > project_slug='aaa', resource_slug='/', path_to_pofile='/aaa/file.po' > ) >- self.assertRaises(TransifexAPIException, self.api.new_resource, >+ self.assertRaises(InvalidSlugException, self.api.new_resource, > project_slug='aaa', resource_slug='%@$', > path_to_pofile='/aaa/file.po' > ) >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 854333
:
609763
| 609764