Merge lp:~cjohnston/ubuntu-ci-services-itself/fix-cli-run-tests into lp:ubuntu-ci-services-itself

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 286
Merged at revision: 287
Proposed branch: lp:~cjohnston/ubuntu-ci-services-itself/fix-cli-run-tests
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 38 lines (+5/-5)
1 file modified
cli/tests/test_file_handler.py (+5/-5)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-ci-services-itself/fix-cli-run-tests
Reviewer Review Type Date Requested Status
Chris Johnston (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Andy Doan (community) Approve
Review via email: mp+208639@code.launchpad.net

Commit message

Fix most of the issues with the cli and run-tests

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:286
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/248/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/248/rebuild

review: Approve (continuous-integration)
Revision history for this message
Chris Johnston (cjohnston) wrote :

 merge approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cli/tests/test_file_handler.py'
2--- cli/tests/test_file_handler.py 2014-02-21 18:18:15 +0000
3+++ cli/tests/test_file_handler.py 2014-02-27 19:16:45 +0000
4@@ -15,20 +15,20 @@
5 # You should have received a copy of the GNU General Public License along with
6 # this program. If not, see <http://www.gnu.org/licenses/>.
7
8-from os.path import join
9+import os
10 from ci_libs.file_handler import (ChangesProcessor, ChangesFileNotFound,
11 ChangesParseError, ChangesValidationError,
12 FileToUploadNotFound, UploadDirNotFound)
13 from dput.changes import Changes, ChangesFileException
14 from tests import CLITestCase
15
16-TEST_DATA_ROOT = "tests/data"
17+TEST_DATA_ROOT = os.path.join(os.path.dirname(__file__), 'data')
18
19
20 class ChangesProcessorTestCase(CLITestCase):
21
22 def _get_test_fullpath(self, filename):
23- return join(TEST_DATA_ROOT, filename)
24+ return os.path.join(TEST_DATA_ROOT, filename)
25
26 def create_test_info(self, source_name="foobar", source_version="0.1",
27 packaging_version="1"):
28@@ -94,8 +94,8 @@
29 def test_files_to_upload_dir_found(self):
30 processor = ChangesProcessor(
31 self._get_test_fullpath(self.changes_file),
32- files_to_upload_dir="tests/data")
33- self.assertEquals(processor.files_to_upload_dir, "tests/data")
34+ files_to_upload_dir=TEST_DATA_ROOT)
35+ self.assertEquals(processor.files_to_upload_dir, TEST_DATA_ROOT)
36
37 def test_file_to_upload_not_found(self):
38 processor = ChangesProcessor(

Subscribers

People subscribed via source and target branches