Merge lp:~mvo/software-center/testenv-cleanup into lp:software-center
- testenv-cleanup
- Merge into trunk
Proposed by
Michael Vogt
Status: | Merged |
---|---|
Merged at revision: | 2654 |
Proposed branch: | lp:~mvo/software-center/testenv-cleanup |
Merge into: | lp:software-center |
Diff against target: |
1186 lines (+158/-241) 54 files modified
softwarecenter/testutils.py (+18/-0) test/gtk3/test_app_view.py (+3/-3) test/gtk3/test_appdetailsview.py (+2/-7) test/gtk3/test_appmanager.py (+2/-2) test/gtk3/test_appstore2.py (+3/-3) test/gtk3/test_appview.py (+2/-6) test/gtk3/test_catview.py (+2/-9) test/gtk3/test_custom_lists.py (+2/-5) test/gtk3/test_dialogs.py (+2/-8) test/gtk3/test_globalpane.py (+4/-12) test/gtk3/test_install_progress.py (+3/-8) test/gtk3/test_installedpane.py (+2/-8) test/gtk3/test_navhistory.py (+2/-3) test/gtk3/test_panes.py (+2/-8) test/gtk3/test_purchase.py (+7/-13) test/gtk3/test_search.py (+2/-8) test/gtk3/test_unity_launcher_integration.py (+2/-5) test/gtk3/test_views.py (+2/-10) test/gtk3/test_widgets.py (+3/-8) test/test_addons.py (+4/-2) test/test_aptcache.py (+3/-3) test/test_aptd.py (+2/-2) test/test_apthistory.py (+4/-3) test/test_cat_parsing.py (+3/-2) test/test_channels.py (+3/-4) test/test_cmdfiner.py (+2/-3) test/test_database.py (+2/-4) test/test_debfileapplication.py (+2/-3) test/test_description_norm.py (+2/-2) test/test_distro.py (+2/-4) test/test_downloader.py (+2/-2) test/test_enquire.py (+4/-6) test/test_gwibber.py (+3/-2) test/test_htmlize.py (+2/-2) test/test_launchpad.py (+2/-4) test/test_login_backend.py (+3/-4) test/test_mime.py (+2/-3) test/test_netstatus.py (+3/-2) test/test_origin.py (+3/-3) test/test_package_info.py (+2/-3) test/test_plugin.py (+2/-3) test/test_ppa_iconfilename.py (+2/-2) test/test_purchase_backend.py (+2/-4) test/test_reinstall_purchased.py (+2/-4) test/test_reviews.py (+4/-9) test/test_rnr_api.py (+4/-4) test/test_scagent.py (+2/-8) test/test_startup.py (+2/-3) test/test_testutils.py (+2/-2) test/test_ubuntu_sso_api.py (+3/-4) test/test_utils.py (+4/-3) test/test_where_is_it.py (+2/-2) test/test_xapian.py (+4/-4) test/xapian_query.py (+3/-0) |
To merge this branch: | bzr merge lp:~mvo/software-center/testenv-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Łukasz Czyżykowski (community) | Approve | ||
software-store-developers | Pending | ||
Review via email: mp+88700@code.launchpad.net |
Commit message
Description of the change
This branch addresses some of the test failures and cleans the code up so that the environment setup is done
in a single place.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'softwarecenter/testutils.py' | |||
2 | --- softwarecenter/testutils.py 2011-12-15 15:26:03 +0000 | |||
3 | +++ softwarecenter/testutils.py 2012-01-16 14:45:27 +0000 | |||
4 | @@ -18,8 +18,11 @@ | |||
5 | 18 | 18 | ||
6 | 19 | import os | 19 | import os |
7 | 20 | import subprocess | 20 | import subprocess |
8 | 21 | import sys | ||
9 | 22 | import tempfile | ||
10 | 21 | import time | 23 | import time |
11 | 22 | 24 | ||
12 | 25 | |||
13 | 23 | m_dbus = m_polkit = m_aptd = None | 26 | m_dbus = m_polkit = m_aptd = None |
14 | 24 | def start_dummy_backend(): | 27 | def start_dummy_backend(): |
15 | 25 | global m_dbus, m_polkit, m_aptd | 28 | global m_dbus, m_polkit, m_aptd |
16 | @@ -133,3 +136,18 @@ | |||
17 | 133 | app._details = details_mock | 136 | app._details = details_mock |
18 | 134 | app.get_details = lambda db: app._details | 137 | app.get_details = lambda db: app._details |
19 | 135 | return app | 138 | return app |
20 | 139 | |||
21 | 140 | def setup_test_env(): | ||
22 | 141 | """ Setup environment suitable for running the test/* code in a checkout. | ||
23 | 142 | This includes PYTHONPATH, sys.path and softwarecenter.paths.datadir. | ||
24 | 143 | """ | ||
25 | 144 | basedir = os.path.dirname(__file__) | ||
26 | 145 | while not os.path.exists( | ||
27 | 146 | os.path.join(basedir, "softwarecenter/__init__.py")): | ||
28 | 147 | basedir = os.path.abspath(os.path.join(basedir, "..")) | ||
29 | 148 | #print basedir, __file__, os.path.realpath(__file__) | ||
30 | 149 | sys.path.insert(0, basedir) | ||
31 | 150 | os.environ["PYTHONPATH"] = basedir | ||
32 | 151 | import softwarecenter.paths | ||
33 | 152 | softwarecenter.paths.datadir = os.path.join(basedir, "data") | ||
34 | 153 | softwarecenter.paths.SOFTWARE_CENTER_CACHE_DIR = tempfile.mkdtemp() | ||
35 | 136 | 154 | ||
36 | === modified file 'test/gtk3/test_app_view.py' | |||
37 | --- test/gtk3/test_app_view.py 2011-08-24 11:41:54 +0000 | |||
38 | +++ test/gtk3/test_app_view.py 2012-01-16 14:45:27 +0000 | |||
39 | @@ -1,13 +1,13 @@ | |||
40 | 1 | #!/usr/bin/python | ||
41 | 1 | 2 | ||
42 | 2 | import sys | ||
43 | 3 | import time | 3 | import time |
44 | 4 | import unittest | 4 | import unittest |
45 | 5 | import xapian | 5 | import xapian |
46 | 6 | 6 | ||
47 | 7 | from gi.repository import Gtk | 7 | from gi.repository import Gtk |
48 | 8 | 8 | ||
51 | 9 | sys.path.insert(0,"../..") | 9 | from testutils import setup_test_env |
52 | 10 | sys.path.insert(0,"..") | 10 | setup_test_env() |
53 | 11 | 11 | ||
54 | 12 | from softwarecenter.db.enquire import AppEnquire | 12 | from softwarecenter.db.enquire import AppEnquire |
55 | 13 | from softwarecenter.enums import SortMethods | 13 | from softwarecenter.enums import SortMethods |
56 | 14 | 14 | ||
57 | === modified file 'test/gtk3/test_appdetailsview.py' | |||
58 | --- test/gtk3/test_appdetailsview.py 2011-12-01 16:09:39 +0000 | |||
59 | +++ test/gtk3/test_appdetailsview.py 2012-01-16 14:45:27 +0000 | |||
60 | @@ -1,17 +1,12 @@ | |||
61 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
62 | 2 | 2 | ||
63 | 3 | #import os | ||
64 | 4 | import sys | ||
65 | 5 | import unittest | 3 | import unittest |
66 | 6 | 4 | ||
69 | 7 | sys.path.insert(0,"../..") | 5 | from testutils import setup_test_env |
70 | 8 | sys.path.insert(0,"..") | 6 | setup_test_env() |
71 | 9 | 7 | ||
72 | 10 | from mock import Mock | 8 | from mock import Mock |
73 | 11 | 9 | ||
74 | 12 | import softwarecenter.paths | ||
75 | 13 | softwarecenter.paths.datadir = "../data" | ||
76 | 14 | |||
77 | 15 | from softwarecenter.db.application import Application | 10 | from softwarecenter.db.application import Application |
78 | 16 | from softwarecenter.testutils import get_mock_app_from_real_app, do_events | 11 | from softwarecenter.testutils import get_mock_app_from_real_app, do_events |
79 | 17 | from softwarecenter.ui.gtk3.views.appdetailsview import get_test_window_appdetails | 12 | from softwarecenter.ui.gtk3.views.appdetailsview import get_test_window_appdetails |
80 | 18 | 13 | ||
81 | === modified file 'test/gtk3/test_appmanager.py' | |||
82 | --- test/gtk3/test_appmanager.py 2011-11-09 10:35:09 +0000 | |||
83 | +++ test/gtk3/test_appmanager.py 2012-01-16 14:45:27 +0000 | |||
84 | @@ -3,8 +3,8 @@ | |||
85 | 3 | from mock import Mock | 3 | from mock import Mock |
86 | 4 | import unittest | 4 | import unittest |
87 | 5 | 5 | ||
90 | 6 | import sys | 6 | from testutils import setup_test_env |
91 | 7 | sys.path.insert(0,"../") | 7 | setup_test_env() |
92 | 8 | 8 | ||
93 | 9 | import softwarecenter.paths | 9 | import softwarecenter.paths |
94 | 10 | from softwarecenter.db.application import Application | 10 | from softwarecenter.db.application import Application |
95 | 11 | 11 | ||
96 | === modified file 'test/gtk3/test_appstore2.py' | |||
97 | --- test/gtk3/test_appstore2.py 2011-08-11 09:25:56 +0000 | |||
98 | +++ test/gtk3/test_appstore2.py 2012-01-16 14:45:27 +0000 | |||
99 | @@ -1,13 +1,13 @@ | |||
100 | 1 | #!/usr/bin/python | ||
101 | 1 | 2 | ||
102 | 2 | import sys | ||
103 | 3 | import unittest | 3 | import unittest |
104 | 4 | import xapian | 4 | import xapian |
105 | 5 | 5 | ||
106 | 6 | from gi.repository import Gtk | 6 | from gi.repository import Gtk |
107 | 7 | 7 | ||
108 | 8 | sys.path.insert(0,"../..") | ||
109 | 9 | sys.path.insert(0,"..") | ||
110 | 10 | 8 | ||
111 | 9 | from testutils import setup_test_env | ||
112 | 10 | setup_test_env() | ||
113 | 11 | from softwarecenter.ui.gtk3.models.appstore2 import AppListStore | 11 | from softwarecenter.ui.gtk3.models.appstore2 import AppListStore |
114 | 12 | from softwarecenter.db.enquire import AppEnquire | 12 | from softwarecenter.db.enquire import AppEnquire |
115 | 13 | 13 | ||
116 | 14 | 14 | ||
117 | === modified file 'test/gtk3/test_appview.py' | |||
118 | --- test/gtk3/test_appview.py 2011-10-07 10:44:12 +0000 | |||
119 | +++ test/gtk3/test_appview.py 2012-01-16 14:45:27 +0000 | |||
120 | @@ -1,20 +1,16 @@ | |||
121 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
122 | 2 | 2 | ||
123 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
124 | 4 | import sys | ||
125 | 5 | import time | 4 | import time |
126 | 6 | import unittest | 5 | import unittest |
127 | 7 | 6 | ||
130 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
131 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
132 | 10 | 9 | ||
133 | 11 | #from mock import Mock | 10 | #from mock import Mock |
134 | 12 | 11 | ||
135 | 13 | TIMEOUT=300 | 12 | TIMEOUT=300 |
136 | 14 | 13 | ||
137 | 15 | import softwarecenter.paths | ||
138 | 16 | softwarecenter.paths.datadir = "../data" | ||
139 | 17 | |||
140 | 18 | class TestViews(unittest.TestCase): | 14 | class TestViews(unittest.TestCase): |
141 | 19 | 15 | ||
142 | 20 | def test_appview_search_combo(self): | 16 | def test_appview_search_combo(self): |
143 | 21 | 17 | ||
144 | === modified file 'test/gtk3/test_catview.py' | |||
145 | --- test/gtk3/test_catview.py 2011-10-05 09:09:24 +0000 | |||
146 | +++ test/gtk3/test_catview.py 2012-01-16 14:45:27 +0000 | |||
147 | @@ -1,16 +1,9 @@ | |||
148 | 1 | from gi.repository import Gtk | 1 | from gi.repository import Gtk |
149 | 2 | import os | ||
150 | 3 | import sys | ||
151 | 4 | import time | 2 | import time |
152 | 5 | import unittest | 3 | import unittest |
153 | 6 | 4 | ||
161 | 7 | sys.path.insert(0,"../..") | 5 | from testutils import setup_test_env |
162 | 8 | sys.path.insert(0,"..") | 6 | setup_test_env() |
156 | 9 | |||
157 | 10 | import softwarecenter.paths | ||
158 | 11 | # ensure datadir is pointing to the right place | ||
159 | 12 | softwarecenter.paths.datadir = os.path.join( | ||
160 | 13 | os.path.dirname(__file__), "..", "..", 'data') | ||
163 | 14 | 7 | ||
164 | 15 | from softwarecenter.enums import SortMethods | 8 | from softwarecenter.enums import SortMethods |
165 | 16 | 9 | ||
166 | 17 | 10 | ||
167 | === modified file 'test/gtk3/test_custom_lists.py' | |||
168 | --- test/gtk3/test_custom_lists.py 2011-11-17 03:23:24 +0000 | |||
169 | +++ test/gtk3/test_custom_lists.py 2012-01-16 14:45:27 +0000 | |||
170 | @@ -1,16 +1,13 @@ | |||
171 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
172 | 2 | 2 | ||
173 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
174 | 4 | import sys | ||
175 | 5 | import time | 4 | import time |
176 | 6 | import unittest | 5 | import unittest |
177 | 7 | 6 | ||
180 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
181 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
182 | 10 | 9 | ||
183 | 11 | from softwarecenter.enums import XapianValues, ActionButtons | 10 | from softwarecenter.enums import XapianValues, ActionButtons |
184 | 12 | import softwarecenter.paths | ||
185 | 13 | softwarecenter.paths.datadir = "../data" | ||
186 | 14 | 11 | ||
187 | 15 | TIMEOUT=300 | 12 | TIMEOUT=300 |
188 | 16 | 13 | ||
189 | 17 | 14 | ||
190 | === modified file 'test/gtk3/test_dialogs.py' | |||
191 | --- test/gtk3/test_dialogs.py 2011-10-11 12:39:31 +0000 | |||
192 | +++ test/gtk3/test_dialogs.py 2012-01-16 14:45:27 +0000 | |||
193 | @@ -1,16 +1,10 @@ | |||
194 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
195 | 2 | 2 | ||
196 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
197 | 4 | import os | ||
198 | 5 | import sys | ||
199 | 6 | import unittest | 4 | import unittest |
200 | 7 | 5 | ||
207 | 8 | sys.path.insert(0,"..") | 6 | from testutils import setup_test_env |
208 | 9 | 7 | setup_test_env() | |
203 | 10 | # ensure datadir is pointing to the right place | ||
204 | 11 | import softwarecenter.paths | ||
205 | 12 | softwarecenter.paths.datadir = os.path.join( | ||
206 | 13 | os.path.dirname(__file__), "..", "..", 'data') | ||
209 | 14 | 8 | ||
210 | 15 | import softwarecenter.ui.gtk3.dialogs | 9 | import softwarecenter.ui.gtk3.dialogs |
211 | 16 | 10 | ||
212 | 17 | 11 | ||
213 | === modified file 'test/gtk3/test_globalpane.py' | |||
214 | --- test/gtk3/test_globalpane.py 2011-12-15 03:18:19 +0000 | |||
215 | +++ test/gtk3/test_globalpane.py 2012-01-16 14:45:27 +0000 | |||
216 | @@ -1,19 +1,11 @@ | |||
217 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
218 | 2 | 2 | ||
219 | 3 | import sys | ||
220 | 4 | import unittest | 3 | import unittest |
221 | 5 | 4 | ||
233 | 6 | sys.path.insert(0,"../..") | 5 | from testutils import setup_test_env |
234 | 7 | sys.path.insert(0,"..") | 6 | setup_test_env() |
235 | 8 | 7 | ||
236 | 9 | #from mock import Mock | 8 | from testutils import do_events |
226 | 10 | |||
227 | 11 | TIMEOUT=300 | ||
228 | 12 | |||
229 | 13 | import softwarecenter.paths | ||
230 | 14 | softwarecenter.paths.datadir = "../data" | ||
231 | 15 | |||
232 | 16 | from softwarecenter.testutils import do_events | ||
237 | 17 | 9 | ||
238 | 18 | class TestGlobalPane(unittest.TestCase): | 10 | class TestGlobalPane(unittest.TestCase): |
239 | 19 | 11 | ||
240 | 20 | 12 | ||
241 | === modified file 'test/gtk3/test_install_progress.py' | |||
242 | --- test/gtk3/test_install_progress.py 2011-11-15 10:54:54 +0000 | |||
243 | +++ test/gtk3/test_install_progress.py 2012-01-16 14:45:27 +0000 | |||
244 | @@ -1,17 +1,12 @@ | |||
245 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
246 | 2 | 2 | ||
247 | 3 | from gi.repository import Gtk | 3 | from gi.repository import Gtk |
248 | 4 | import sys | ||
249 | 5 | import time | 4 | import time |
250 | 6 | import unittest | 5 | import unittest |
251 | 7 | 6 | ||
259 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
260 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
261 | 10 | 9 | ||
255 | 11 | #from mock import Mock | ||
256 | 12 | |||
257 | 13 | import softwarecenter.paths | ||
258 | 14 | softwarecenter.paths.datadir = "../data" | ||
262 | 15 | 10 | ||
263 | 16 | from softwarecenter.db.application import Application | 11 | from softwarecenter.db.application import Application |
264 | 17 | from softwarecenter.testutils import start_dummy_backend, stop_dummy_backend | 12 | from softwarecenter.testutils import start_dummy_backend, stop_dummy_backend |
265 | 18 | 13 | ||
266 | === modified file 'test/gtk3/test_installedpane.py' | |||
267 | --- test/gtk3/test_installedpane.py 2011-11-17 03:34:17 +0000 | |||
268 | +++ test/gtk3/test_installedpane.py 2012-01-16 14:45:27 +0000 | |||
269 | @@ -1,20 +1,14 @@ | |||
270 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
271 | 2 | 2 | ||
272 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
273 | 4 | import sys | ||
274 | 5 | import time | 4 | import time |
275 | 6 | import unittest | 5 | import unittest |
276 | 7 | 6 | ||
281 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
282 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
279 | 10 | |||
280 | 11 | #from mock import Mock | ||
283 | 12 | 9 | ||
284 | 13 | TIMEOUT=300 | 10 | TIMEOUT=300 |
285 | 14 | 11 | ||
286 | 15 | import softwarecenter.paths | ||
287 | 16 | softwarecenter.paths.datadir = "../data" | ||
288 | 17 | |||
289 | 18 | class TestInstalledPane(unittest.TestCase): | 12 | class TestInstalledPane(unittest.TestCase): |
290 | 19 | 13 | ||
291 | 20 | def test_installedpane(self): | 14 | def test_installedpane(self): |
292 | 21 | 15 | ||
293 | === modified file 'test/gtk3/test_navhistory.py' | |||
294 | --- test/gtk3/test_navhistory.py 2011-09-20 08:14:41 +0000 | |||
295 | +++ test/gtk3/test_navhistory.py 2012-01-16 14:45:27 +0000 | |||
296 | @@ -1,12 +1,11 @@ | |||
297 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
298 | 2 | 2 | ||
299 | 3 | import sys | ||
300 | 4 | import unittest | 3 | import unittest |
301 | 5 | 4 | ||
302 | 6 | from mock import Mock | 5 | from mock import Mock |
303 | 7 | 6 | ||
306 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
307 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
308 | 10 | 9 | ||
309 | 11 | from softwarecenter.ui.gtk3.session.navhistory import ( | 10 | from softwarecenter.ui.gtk3.session.navhistory import ( |
310 | 12 | NavigationHistory, NavigationItem) | 11 | NavigationHistory, NavigationItem) |
311 | 13 | 12 | ||
312 | === modified file 'test/gtk3/test_panes.py' | |||
313 | --- test/gtk3/test_panes.py 2011-09-07 02:20:57 +0000 | |||
314 | +++ test/gtk3/test_panes.py 2012-01-16 14:45:27 +0000 | |||
315 | @@ -1,19 +1,13 @@ | |||
316 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
317 | 2 | 2 | ||
318 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
319 | 4 | import sys | ||
320 | 5 | import unittest | 4 | import unittest |
321 | 6 | 5 | ||
326 | 7 | sys.path.insert(0,"../..") | 6 | from testutils import setup_test_env |
327 | 8 | sys.path.insert(0,"..") | 7 | setup_test_env() |
324 | 9 | |||
325 | 10 | #from mock import Mock | ||
328 | 11 | 8 | ||
329 | 12 | TIMEOUT=300 | 9 | TIMEOUT=300 |
330 | 13 | 10 | ||
331 | 14 | import softwarecenter.paths | ||
332 | 15 | softwarecenter.paths.datadir = "../data" | ||
333 | 16 | |||
334 | 17 | class TestPanes(unittest.TestCase): | 11 | class TestPanes(unittest.TestCase): |
335 | 18 | 12 | ||
336 | 19 | def test_availablepane(self): | 13 | def test_availablepane(self): |
337 | 20 | 14 | ||
338 | === modified file 'test/gtk3/test_purchase.py' | |||
339 | --- test/gtk3/test_purchase.py 2011-12-15 03:18:19 +0000 | |||
340 | +++ test/gtk3/test_purchase.py 2012-01-16 14:45:27 +0000 | |||
341 | @@ -1,24 +1,16 @@ | |||
342 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
343 | 2 | 2 | ||
344 | 3 | import os | ||
345 | 4 | import sys | ||
346 | 5 | import time | 3 | import time |
347 | 6 | import unittest | 4 | import unittest |
348 | 7 | 5 | ||
349 | 8 | from mock import Mock | 6 | from mock import Mock |
350 | 9 | 7 | ||
353 | 10 | sys.path.insert(0,"../..") | 8 | from testutils import setup_test_env, do_events |
354 | 11 | sys.path.insert(0,"..") | 9 | setup_test_env() |
355 | 12 | 10 | ||
357 | 13 | # overwrite early | 11 | from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3 |
358 | 12 | from softwarecenter.ui.gtk3.panes.availablepane import AvailablePane | ||
359 | 14 | import softwarecenter.paths | 13 | import softwarecenter.paths |
360 | 15 | softwarecenter.paths.datadir = "../data" | ||
361 | 16 | |||
362 | 17 | from softwarecenter.ui.gtk3.app import ( | ||
363 | 18 | SoftwareCenterAppGtk3) | ||
364 | 19 | from softwarecenter.ui.gtk3.panes.availablepane import ( | ||
365 | 20 | AvailablePane) | ||
366 | 21 | from softwarecenter.testutils import do_events | ||
367 | 22 | 14 | ||
368 | 23 | class TestPurchase(unittest.TestCase): | 15 | class TestPurchase(unittest.TestCase): |
369 | 24 | 16 | ||
370 | @@ -63,7 +55,6 @@ | |||
371 | 63 | 55 | ||
372 | 64 | 56 | ||
373 | 65 | def test_reinstall_previous_purchase_display(self): | 57 | def test_reinstall_previous_purchase_display(self): |
374 | 66 | os.environ["PYTHONPATH"]=".." | ||
375 | 67 | mock_options = Mock() | 58 | mock_options = Mock() |
376 | 68 | mock_options.display_navlog = False | 59 | mock_options.display_navlog = False |
377 | 69 | mock_options.disable_apt_xapian_index = False | 60 | mock_options.disable_apt_xapian_index = False |
378 | @@ -71,6 +62,9 @@ | |||
379 | 71 | xapiandb = "/var/cache/software-center/" | 62 | xapiandb = "/var/cache/software-center/" |
380 | 72 | app = SoftwareCenterAppGtk3( | 63 | app = SoftwareCenterAppGtk3( |
381 | 73 | softwarecenter.paths.datadir, xapiandb, mock_options) | 64 | softwarecenter.paths.datadir, xapiandb, mock_options) |
382 | 65 | # real app opens cache async | ||
383 | 66 | app.cache.open() | ||
384 | 67 | # show it | ||
385 | 74 | app.window_main.show_all() | 68 | app.window_main.show_all() |
386 | 75 | app.available_pane.init_view() | 69 | app.available_pane.init_view() |
387 | 76 | self._p() | 70 | self._p() |
388 | 77 | 71 | ||
389 | === modified file 'test/gtk3/test_search.py' | |||
390 | --- test/gtk3/test_search.py 2011-10-07 10:44:12 +0000 | |||
391 | +++ test/gtk3/test_search.py 2012-01-16 14:45:27 +0000 | |||
392 | @@ -1,20 +1,14 @@ | |||
393 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
394 | 2 | 2 | ||
395 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
396 | 4 | import sys | ||
397 | 5 | import time | 4 | import time |
398 | 6 | import unittest | 5 | import unittest |
399 | 7 | 6 | ||
404 | 8 | sys.path.insert(0,"../..") | 7 | from testutils import setup_test_env |
405 | 9 | sys.path.insert(0,"..") | 8 | setup_test_env() |
402 | 10 | |||
403 | 11 | #from mock import Mock | ||
406 | 12 | 9 | ||
407 | 13 | TIMEOUT=300 | 10 | TIMEOUT=300 |
408 | 14 | 11 | ||
409 | 15 | import softwarecenter.paths | ||
410 | 16 | softwarecenter.paths.datadir = "../data" | ||
411 | 17 | |||
412 | 18 | class TestSearch(unittest.TestCase): | 12 | class TestSearch(unittest.TestCase): |
413 | 19 | 13 | ||
414 | 20 | def test_installedpane(self): | 14 | def test_installedpane(self): |
415 | 21 | 15 | ||
416 | === modified file 'test/gtk3/test_unity_launcher_integration.py' | |||
417 | --- test/gtk3/test_unity_launcher_integration.py 2011-12-15 02:53:48 +0000 | |||
418 | +++ test/gtk3/test_unity_launcher_integration.py 2012-01-16 14:45:27 +0000 | |||
419 | @@ -1,19 +1,16 @@ | |||
420 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
421 | 2 | 2 | ||
422 | 3 | from gi.repository import Gtk | 3 | from gi.repository import Gtk |
423 | 4 | import sys | ||
424 | 5 | import time | 4 | import time |
425 | 6 | import unittest | 5 | import unittest |
426 | 7 | 6 | ||
427 | 8 | from mock import Mock | 7 | from mock import Mock |
428 | 9 | 8 | ||
431 | 10 | sys.path.insert(0,"../..") | 9 | from testutils import setup_test_env |
432 | 11 | sys.path.insert(0,"..") | 10 | setup_test_env() |
433 | 12 | 11 | ||
434 | 13 | # overwrite early | 12 | # overwrite early |
435 | 14 | import softwarecenter.paths | ||
436 | 15 | import softwarecenter.utils | 13 | import softwarecenter.utils |
437 | 16 | softwarecenter.paths.datadir = "../data" | ||
438 | 17 | 14 | ||
439 | 18 | from softwarecenter.enums import TransactionTypes | 15 | from softwarecenter.enums import TransactionTypes |
440 | 19 | from softwarecenter.utils import convert_desktop_file_to_installed_location | 16 | from softwarecenter.utils import convert_desktop_file_to_installed_location |
441 | 20 | 17 | ||
442 | === modified file 'test/gtk3/test_views.py' | |||
443 | --- test/gtk3/test_views.py 2012-01-05 11:24:51 +0000 | |||
444 | +++ test/gtk3/test_views.py 2012-01-16 14:45:27 +0000 | |||
445 | @@ -1,21 +1,13 @@ | |||
446 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
447 | 2 | 2 | ||
448 | 3 | from gi.repository import Gtk, GObject | 3 | from gi.repository import Gtk, GObject |
449 | 4 | import sys | ||
450 | 5 | import unittest | 4 | import unittest |
451 | 6 | 5 | ||
456 | 7 | sys.path.insert(0,"../..") | 6 | from testutils import setup_test_env |
457 | 8 | sys.path.insert(0,"..") | 7 | setup_test_env() |
454 | 9 | |||
455 | 10 | #from mock import Mock | ||
458 | 11 | 8 | ||
459 | 12 | TIMEOUT=300 | 9 | TIMEOUT=300 |
460 | 13 | 10 | ||
461 | 14 | import softwarecenter.paths | ||
462 | 15 | softwarecenter.paths.datadir = "../data" | ||
463 | 16 | import os | ||
464 | 17 | os.environ["PYTHONPATH"] = "../" | ||
465 | 18 | |||
466 | 19 | class TestViews(unittest.TestCase): | 11 | class TestViews(unittest.TestCase): |
467 | 20 | 12 | ||
468 | 21 | def test_viewswitcher(self): | 13 | def test_viewswitcher(self): |
469 | 22 | 14 | ||
470 | === modified file 'test/gtk3/test_widgets.py' | |||
471 | --- test/gtk3/test_widgets.py 2011-10-11 11:58:07 +0000 | |||
472 | +++ test/gtk3/test_widgets.py 2012-01-16 14:45:27 +0000 | |||
473 | @@ -2,18 +2,13 @@ | |||
474 | 2 | 2 | ||
475 | 3 | from gi.repository import Gtk, GdkPixbuf, GObject | 3 | from gi.repository import Gtk, GdkPixbuf, GObject |
476 | 4 | import os | 4 | import os |
477 | 5 | import sys | ||
478 | 6 | import unittest | 5 | import unittest |
479 | 7 | 6 | ||
480 | 8 | from mock import Mock | 7 | from mock import Mock |
481 | 9 | 8 | ||
489 | 10 | 9 | from testutils import setup_test_env | |
490 | 11 | sys.path.insert(0,"..") | 10 | setup_test_env() |
491 | 12 | 11 | ||
485 | 13 | # ensure datadir is pointing to the right place | ||
486 | 14 | import softwarecenter.paths | ||
487 | 15 | softwarecenter.paths.datadir = os.path.join( | ||
488 | 16 | os.path.dirname(__file__), "..", "..", 'data') | ||
492 | 17 | 12 | ||
493 | 18 | # window destory timeout | 13 | # window destory timeout |
494 | 19 | TIMEOUT=100 | 14 | TIMEOUT=100 |
495 | 20 | 15 | ||
496 | === added symlink 'test/gtk3/testutils.py' | |||
497 | === target is u'../../softwarecenter/testutils.py' | |||
498 | === modified file 'test/test_addons.py' | |||
499 | --- test/test_addons.py 2011-09-28 16:01:02 +0000 | |||
500 | +++ test/test_addons.py 2012-01-16 14:45:27 +0000 | |||
501 | @@ -1,8 +1,10 @@ | |||
502 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
503 | 2 | 2 | ||
505 | 3 | import sys | 3 | |
506 | 4 | import unittest | 4 | import unittest |
508 | 5 | sys.path.insert(0,"../") | 5 | |
509 | 6 | from testutils import setup_test_env | ||
510 | 7 | setup_test_env() | ||
511 | 6 | 8 | ||
512 | 7 | from softwarecenter.db.pkginfo import get_pkg_info | 9 | from softwarecenter.db.pkginfo import get_pkg_info |
513 | 8 | 10 | ||
514 | 9 | 11 | ||
515 | === modified file 'test/test_aptcache.py' | |||
516 | --- test/test_aptcache.py 2011-07-14 14:42:36 +0000 | |||
517 | +++ test/test_aptcache.py 2012-01-16 14:45:27 +0000 | |||
518 | @@ -2,14 +2,14 @@ | |||
519 | 2 | 2 | ||
520 | 3 | from gi.repository import GObject | 3 | from gi.repository import GObject |
521 | 4 | 4 | ||
522 | 5 | import sys | ||
523 | 6 | sys.path.insert(0,"../") | ||
524 | 7 | |||
525 | 8 | import apt | 5 | import apt |
526 | 9 | import logging | 6 | import logging |
527 | 10 | import time | 7 | import time |
528 | 11 | import unittest | 8 | import unittest |
529 | 12 | 9 | ||
530 | 10 | from testutils import setup_test_env | ||
531 | 11 | setup_test_env() | ||
532 | 12 | |||
533 | 13 | from softwarecenter.db.pkginfo import get_pkg_info | 13 | from softwarecenter.db.pkginfo import get_pkg_info |
534 | 14 | from softwarecenter.utils import ExecutionTime | 14 | from softwarecenter.utils import ExecutionTime |
535 | 15 | 15 | ||
536 | 16 | 16 | ||
537 | === modified file 'test/test_aptd.py' | |||
538 | --- test/test_aptd.py 2011-11-28 23:28:52 +0000 | |||
539 | +++ test/test_aptd.py 2012-01-16 14:45:27 +0000 | |||
540 | @@ -1,12 +1,12 @@ | |||
541 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
542 | 2 | 2 | ||
543 | 3 | import os | 3 | import os |
544 | 4 | import sys | ||
545 | 5 | import time | 4 | import time |
546 | 6 | import unittest | 5 | import unittest |
547 | 7 | 6 | ||
548 | 7 | from testutils import setup_test_env | ||
549 | 8 | setup_test_env() | ||
550 | 8 | 9 | ||
551 | 9 | sys.path.insert(0,"../") | ||
552 | 10 | from softwarecenter.backend.installbackend_impl.aptd import AptdaemonBackend | 10 | from softwarecenter.backend.installbackend_impl.aptd import AptdaemonBackend |
553 | 11 | from defer import inline_callbacks | 11 | from defer import inline_callbacks |
554 | 12 | from mock import Mock | 12 | from mock import Mock |
555 | 13 | 13 | ||
556 | === modified file 'test/test_apthistory.py' | |||
557 | --- test/test_apthistory.py 2011-07-14 14:42:36 +0000 | |||
558 | +++ test/test_apthistory.py 2012-01-16 14:45:27 +0000 | |||
559 | @@ -2,17 +2,18 @@ | |||
560 | 2 | 2 | ||
561 | 3 | from gi.repository import GObject | 3 | from gi.repository import GObject |
562 | 4 | 4 | ||
563 | 5 | import sys | ||
564 | 6 | sys.path.insert(0,"../") | ||
565 | 7 | |||
566 | 8 | import apt | 5 | import apt |
567 | 9 | import datetime | 6 | import datetime |
568 | 10 | import logging | 7 | import logging |
569 | 11 | import os | 8 | import os |
570 | 12 | import subprocess | 9 | import subprocess |
571 | 10 | import sys | ||
572 | 13 | import time | 11 | import time |
573 | 14 | import unittest | 12 | import unittest |
574 | 15 | 13 | ||
575 | 14 | from testutils import setup_test_env | ||
576 | 15 | setup_test_env() | ||
577 | 16 | |||
578 | 16 | from softwarecenter.db.history_impl.apthistory import AptHistory | 17 | from softwarecenter.db.history_impl.apthistory import AptHistory |
579 | 17 | from softwarecenter.utils import ExecutionTime | 18 | from softwarecenter.utils import ExecutionTime |
580 | 18 | 19 | ||
581 | 19 | 20 | ||
582 | === modified file 'test/test_cat_parsing.py' | |||
583 | --- test/test_cat_parsing.py 2011-06-06 09:59:08 +0000 | |||
584 | +++ test/test_cat_parsing.py 2012-01-16 14:45:27 +0000 | |||
585 | @@ -1,9 +1,10 @@ | |||
586 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
587 | 2 | 2 | ||
588 | 3 | import os | 3 | import os |
589 | 4 | import sys | ||
590 | 5 | import unittest | 4 | import unittest |
592 | 6 | sys.path.insert(0,"../") | 5 | |
593 | 6 | from testutils import setup_test_env | ||
594 | 7 | setup_test_env() | ||
595 | 7 | 8 | ||
596 | 8 | from softwarecenter.paths import XAPIAN_BASE_PATH | 9 | from softwarecenter.paths import XAPIAN_BASE_PATH |
597 | 9 | 10 | ||
598 | 10 | 11 | ||
599 | === modified file 'test/test_channels.py' | |||
600 | --- test/test_channels.py 2011-11-09 11:04:33 +0000 | |||
601 | +++ test/test_channels.py 2012-01-16 14:45:27 +0000 | |||
602 | @@ -1,10 +1,9 @@ | |||
603 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
604 | 2 | 2 | ||
605 | 3 | |||
606 | 4 | import sys | ||
607 | 5 | sys.path.insert(0,"../") | ||
608 | 6 | |||
609 | 7 | import unittest | 3 | import unittest |
610 | 4 | |||
611 | 5 | from testutils import setup_test_env | ||
612 | 6 | setup_test_env() | ||
613 | 8 | from softwarecenter.testutils import get_test_db | 7 | from softwarecenter.testutils import get_test_db |
614 | 9 | 8 | ||
615 | 10 | class TestChannels(unittest.TestCase): | 9 | class TestChannels(unittest.TestCase): |
616 | 11 | 10 | ||
617 | === modified file 'test/test_cmdfiner.py' | |||
618 | --- test/test_cmdfiner.py 2011-03-22 13:51:20 +0000 | |||
619 | +++ test/test_cmdfiner.py 2012-01-16 14:45:27 +0000 | |||
620 | @@ -3,9 +3,8 @@ | |||
621 | 3 | import apt | 3 | import apt |
622 | 4 | import unittest | 4 | import unittest |
623 | 5 | 5 | ||
627 | 6 | import sys | 6 | from testutils import setup_test_env |
628 | 7 | sys.path.insert(0,"../") | 7 | setup_test_env() |
626 | 8 | |||
629 | 9 | from softwarecenter.cmdfinder import CmdFinder | 8 | from softwarecenter.cmdfinder import CmdFinder |
630 | 10 | 9 | ||
631 | 11 | class TestCmdFinder(unittest.TestCase): | 10 | class TestCmdFinder(unittest.TestCase): |
632 | 12 | 11 | ||
633 | === modified file 'test/test_database.py' | |||
634 | --- test/test_database.py 2012-01-05 09:53:52 +0000 | |||
635 | +++ test/test_database.py 2012-01-16 14:45:27 +0000 | |||
636 | @@ -1,8 +1,8 @@ | |||
637 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
638 | 2 | 2 | ||
639 | 3 | 3 | ||
642 | 4 | import sys | 4 | from testutils import setup_test_env |
643 | 5 | sys.path.insert(0,"../") | 5 | setup_test_env() |
644 | 6 | 6 | ||
645 | 7 | import apt | 7 | import apt |
646 | 8 | import os | 8 | import os |
647 | @@ -106,8 +106,6 @@ | |||
648 | 106 | distro.get_codename = lambda: "natty" | 106 | distro.get_codename = lambda: "natty" |
649 | 107 | # we test against the real https://software-center.ubuntu.com here | 107 | # we test against the real https://software-center.ubuntu.com here |
650 | 108 | # so we need network | 108 | # so we need network |
651 | 109 | softwarecenter.paths.datadir="../data" | ||
652 | 110 | os.environ["PYTHONPATH"] = ".." | ||
653 | 111 | res = update_from_software_center_agent(db, cache, ignore_cache=True) | 109 | res = update_from_software_center_agent(db, cache, ignore_cache=True) |
654 | 112 | # check results | 110 | # check results |
655 | 113 | self.assertTrue(res) | 111 | self.assertTrue(res) |
656 | 114 | 112 | ||
657 | === modified file 'test/test_debfileapplication.py' | |||
658 | --- test/test_debfileapplication.py 2011-12-13 16:44:21 +0000 | |||
659 | +++ test/test_debfileapplication.py 2012-01-16 14:45:27 +0000 | |||
660 | @@ -1,11 +1,10 @@ | |||
661 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
662 | 2 | 2 | ||
663 | 3 | import sys | ||
664 | 4 | import unittest | 3 | import unittest |
665 | 5 | import logging | 4 | import logging |
666 | 6 | 5 | ||
669 | 7 | sys.path.insert(0, '../') | 6 | from testutils import setup_test_env |
670 | 8 | 7 | setup_test_env() | |
671 | 9 | 8 | ||
672 | 10 | from softwarecenter.enums import PkgStates | 9 | from softwarecenter.enums import PkgStates |
673 | 11 | from softwarecenter.db.debfile import DebFileApplication | 10 | from softwarecenter.db.debfile import DebFileApplication |
674 | 12 | 11 | ||
675 | === modified file 'test/test_description_norm.py' | |||
676 | --- test/test_description_norm.py 2011-09-20 20:51:57 +0000 | |||
677 | +++ test/test_description_norm.py 2012-01-16 14:45:27 +0000 | |||
678 | @@ -2,10 +2,10 @@ | |||
679 | 2 | 2 | ||
680 | 3 | import apt | 3 | import apt |
681 | 4 | import logging | 4 | import logging |
682 | 5 | import sys | ||
683 | 6 | import unittest | 5 | import unittest |
684 | 7 | 6 | ||
686 | 8 | sys.path.insert(0,"../") | 7 | from testutils import setup_test_env |
687 | 8 | setup_test_env() | ||
688 | 9 | from softwarecenter.utils import normalize_package_description | 9 | from softwarecenter.utils import normalize_package_description |
689 | 10 | 10 | ||
690 | 11 | 11 | ||
691 | 12 | 12 | ||
692 | === modified file 'test/test_distro.py' | |||
693 | --- test/test_distro.py 2011-05-31 09:49:14 +0000 | |||
694 | +++ test/test_distro.py 2012-01-16 14:45:27 +0000 | |||
695 | @@ -1,11 +1,9 @@ | |||
696 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
697 | 2 | 2 | ||
698 | 3 | |||
699 | 4 | import sys | ||
700 | 5 | sys.path.insert(0,"../") | ||
701 | 6 | |||
702 | 7 | import unittest | 3 | import unittest |
703 | 8 | 4 | ||
704 | 5 | from testutils import setup_test_env | ||
705 | 6 | setup_test_env() | ||
706 | 9 | from softwarecenter.distro import get_distro | 7 | from softwarecenter.distro import get_distro |
707 | 10 | 8 | ||
708 | 11 | class TestDistro(unittest.TestCase): | 9 | class TestDistro(unittest.TestCase): |
709 | 12 | 10 | ||
710 | === modified file 'test/test_downloader.py' | |||
711 | --- test/test_downloader.py 2012-01-06 14:01:23 +0000 | |||
712 | +++ test/test_downloader.py 2012-01-16 14:45:27 +0000 | |||
713 | @@ -3,11 +3,11 @@ | |||
714 | 3 | from gi.repository import GObject | 3 | from gi.repository import GObject |
715 | 4 | 4 | ||
716 | 5 | import os | 5 | import os |
717 | 6 | import sys | ||
718 | 7 | import time | 6 | import time |
719 | 8 | import unittest | 7 | import unittest |
720 | 9 | 8 | ||
722 | 10 | sys.path.insert(0,"../") | 9 | from testutils import setup_test_env |
723 | 10 | setup_test_env() | ||
724 | 11 | from softwarecenter.utils import SimpleFileDownloader | 11 | from softwarecenter.utils import SimpleFileDownloader |
725 | 12 | 12 | ||
726 | 13 | class TestImageDownloader(unittest.TestCase): | 13 | class TestImageDownloader(unittest.TestCase): |
727 | 14 | 14 | ||
728 | === modified file 'test/test_enquire.py' | |||
729 | --- test/test_enquire.py 2011-08-25 18:51:39 +0000 | |||
730 | +++ test/test_enquire.py 2012-01-16 14:45:27 +0000 | |||
731 | @@ -1,18 +1,16 @@ | |||
732 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
733 | 2 | 2 | ||
737 | 3 | 3 | from gi.repository import Gtk | |
735 | 4 | import sys | ||
736 | 5 | sys.path.insert(0,"../") | ||
738 | 6 | 4 | ||
739 | 7 | import time | 5 | import time |
740 | 8 | import unittest | 6 | import unittest |
741 | 9 | import xapian | 7 | import xapian |
742 | 10 | 8 | ||
743 | 9 | from testutils import setup_test_env | ||
744 | 10 | setup_test_env() | ||
745 | 11 | from softwarecenter.db.appfilter import AppFilter | ||
746 | 11 | from softwarecenter.db.enquire import AppEnquire | 12 | from softwarecenter.db.enquire import AppEnquire |
747 | 12 | |||
748 | 13 | from gi.repository import Gtk | ||
749 | 14 | from softwarecenter.testutils import get_test_db, get_test_pkg_info | 13 | from softwarecenter.testutils import get_test_db, get_test_pkg_info |
750 | 15 | from softwarecenter.db.appfilter import AppFilter | ||
751 | 16 | 14 | ||
752 | 17 | class TestEnquire(unittest.TestCase): | 15 | class TestEnquire(unittest.TestCase): |
753 | 18 | 16 | ||
754 | 19 | 17 | ||
755 | === modified file 'test/test_gwibber.py' | |||
756 | --- test/test_gwibber.py 2011-02-11 08:25:40 +0000 | |||
757 | +++ test/test_gwibber.py 2012-01-16 14:45:27 +0000 | |||
758 | @@ -1,9 +1,10 @@ | |||
759 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
760 | 2 | 2 | ||
761 | 3 | import os | 3 | import os |
762 | 4 | import sys | ||
763 | 5 | import unittest | 4 | import unittest |
765 | 6 | sys.path.insert(0,"../") | 5 | |
766 | 6 | from testutils import setup_test_env | ||
767 | 7 | setup_test_env() | ||
768 | 7 | 8 | ||
769 | 8 | class TestGwibber(unittest.TestCase): | 9 | class TestGwibber(unittest.TestCase): |
770 | 9 | """ tests the "where is it in the menu" code """ | 10 | """ tests the "where is it in the menu" code """ |
771 | 10 | 11 | ||
772 | === modified file 'test/test_htmlize.py' | |||
773 | --- test/test_htmlize.py 2011-06-20 07:48:13 +0000 | |||
774 | +++ test/test_htmlize.py 2012-01-16 14:45:27 +0000 | |||
775 | @@ -1,7 +1,7 @@ | |||
776 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
777 | 2 | 2 | ||
780 | 3 | import sys | 3 | from testutils import setup_test_env |
781 | 4 | sys.path.insert(0, "..") | 4 | setup_test_env() |
782 | 5 | from softwarecenter.utils import htmlize_package_description | 5 | from softwarecenter.utils import htmlize_package_description |
783 | 6 | 6 | ||
784 | 7 | #file-roller | 7 | #file-roller |
785 | 8 | 8 | ||
786 | === modified file 'test/test_launchpad.py' | |||
787 | --- test/test_launchpad.py 2011-07-14 14:42:36 +0000 | |||
788 | +++ test/test_launchpad.py 2012-01-16 14:45:27 +0000 | |||
789 | @@ -1,12 +1,10 @@ | |||
790 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
791 | 2 | 2 | ||
792 | 3 | from gi.repository import GObject | 3 | from gi.repository import GObject |
793 | 4 | |||
794 | 5 | import sys | ||
795 | 6 | sys.path.insert(0,"../") | ||
796 | 7 | |||
797 | 8 | import unittest | 4 | import unittest |
798 | 9 | 5 | ||
799 | 6 | from testutils import setup_test_env | ||
800 | 7 | setup_test_env() | ||
801 | 10 | from softwarecenter.backend.launchpad import GLaunchpad | 8 | from softwarecenter.backend.launchpad import GLaunchpad |
802 | 11 | 9 | ||
803 | 12 | class testUbuntuSSO(unittest.TestCase): | 10 | class testUbuntuSSO(unittest.TestCase): |
804 | 13 | 11 | ||
805 | === modified file 'test/test_login_backend.py' | |||
806 | --- test/test_login_backend.py 2011-06-11 07:59:59 +0000 | |||
807 | +++ test/test_login_backend.py 2012-01-16 14:45:27 +0000 | |||
808 | @@ -1,11 +1,10 @@ | |||
809 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
810 | 2 | 2 | ||
811 | 3 | |||
812 | 4 | import sys | ||
813 | 5 | sys.path.insert(0,"../") | ||
814 | 6 | |||
815 | 7 | import os | 3 | import os |
816 | 8 | import unittest | 4 | import unittest |
817 | 5 | |||
818 | 6 | from testutils import setup_test_env | ||
819 | 7 | setup_test_env() | ||
820 | 9 | from softwarecenter.backend.login_sso import (get_sso_backend, | 8 | from softwarecenter.backend.login_sso import (get_sso_backend, |
821 | 10 | LoginBackendDbusSSO, | 9 | LoginBackendDbusSSO, |
822 | 11 | LoginBackendDbusSSOFake) | 10 | LoginBackendDbusSSOFake) |
823 | 12 | 11 | ||
824 | === modified file 'test/test_mime.py' | |||
825 | --- test/test_mime.py 2011-05-18 08:26:04 +0000 | |||
826 | +++ test/test_mime.py 2012-01-16 14:45:27 +0000 | |||
827 | @@ -1,11 +1,10 @@ | |||
828 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
829 | 2 | 2 | ||
830 | 3 | import sys | ||
831 | 4 | sys.path.insert(0,"../") | ||
832 | 5 | |||
833 | 6 | import os | 3 | import os |
834 | 7 | import unittest | 4 | import unittest |
835 | 8 | 5 | ||
836 | 6 | from testutils import setup_test_env | ||
837 | 7 | setup_test_env() | ||
838 | 9 | from softwarecenter.db.database import StoreDatabase | 8 | from softwarecenter.db.database import StoreDatabase |
839 | 10 | from softwarecenter.db.pkginfo import get_pkg_info | 9 | from softwarecenter.db.pkginfo import get_pkg_info |
840 | 11 | from softwarecenter.db.update import rebuild_database | 10 | from softwarecenter.db.update import rebuild_database |
841 | 12 | 11 | ||
842 | === modified file 'test/test_netstatus.py' | |||
843 | --- test/test_netstatus.py 2011-10-20 16:34:14 +0000 | |||
844 | +++ test/test_netstatus.py 2012-01-16 14:45:27 +0000 | |||
845 | @@ -1,8 +1,9 @@ | |||
846 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
847 | 2 | 2 | ||
848 | 3 | import sys | ||
849 | 4 | import unittest | 3 | import unittest |
851 | 5 | sys.path.insert(0,"../") | 4 | |
852 | 5 | from testutils import setup_test_env | ||
853 | 6 | setup_test_env() | ||
854 | 6 | 7 | ||
855 | 7 | class TestNetstatus(unittest.TestCase): | 8 | class TestNetstatus(unittest.TestCase): |
856 | 8 | """ tests the netstaus utils """ | 9 | """ tests the netstaus utils """ |
857 | 9 | 10 | ||
858 | === modified file 'test/test_origin.py' | |||
859 | --- test/test_origin.py 2011-06-06 08:49:12 +0000 | |||
860 | +++ test/test_origin.py 2012-01-16 14:45:27 +0000 | |||
861 | @@ -1,10 +1,10 @@ | |||
862 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
863 | 2 | 2 | ||
865 | 3 | import sys | 3 | import apt |
866 | 4 | import unittest | 4 | import unittest |
867 | 5 | sys.path.insert(0,"../") | ||
868 | 6 | 5 | ||
870 | 7 | import apt | 6 | from testutils import setup_test_env |
871 | 7 | setup_test_env() | ||
872 | 8 | 8 | ||
873 | 9 | class TestOrigins(unittest.TestCase): | 9 | class TestOrigins(unittest.TestCase): |
874 | 10 | """ tests the origin code """ | 10 | """ tests the origin code """ |
875 | 11 | 11 | ||
876 | === modified file 'test/test_package_info.py' | |||
877 | --- test/test_package_info.py 2011-11-21 13:03:36 +0000 | |||
878 | +++ test/test_package_info.py 2012-01-16 14:45:27 +0000 | |||
879 | @@ -1,11 +1,10 @@ | |||
880 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
881 | 2 | 2 | ||
882 | 3 | import sys | ||
883 | 4 | sys.path.insert(0,"../") | ||
884 | 5 | |||
885 | 6 | import logging | 3 | import logging |
886 | 7 | import unittest | 4 | import unittest |
887 | 8 | 5 | ||
888 | 6 | from testutils import setup_test_env | ||
889 | 7 | setup_test_env() | ||
890 | 9 | from softwarecenter.db.pkginfo import _Package, _Version | 8 | from softwarecenter.db.pkginfo import _Package, _Version |
891 | 10 | from softwarecenter.db.pkginfo_impl.aptcache import AptCache | 9 | from softwarecenter.db.pkginfo_impl.aptcache import AptCache |
892 | 11 | # from softwarecenter.db.pkginfo_impl.packagekit import PackagekitInfo | 10 | # from softwarecenter.db.pkginfo_impl.packagekit import PackagekitInfo |
893 | 12 | 11 | ||
894 | === modified file 'test/test_plugin.py' | |||
895 | --- test/test_plugin.py 2011-11-10 10:30:57 +0000 | |||
896 | +++ test/test_plugin.py 2012-01-16 14:45:27 +0000 | |||
897 | @@ -1,11 +1,10 @@ | |||
898 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
899 | 2 | 2 | ||
900 | 3 | import sys | ||
901 | 4 | sys.path.insert(0,"../") | ||
902 | 5 | |||
903 | 6 | import logging | 3 | import logging |
904 | 7 | import unittest | 4 | import unittest |
905 | 8 | 5 | ||
906 | 6 | from testutils import setup_test_env | ||
907 | 7 | setup_test_env() | ||
908 | 9 | from softwarecenter.plugin import PluginManager | 8 | from softwarecenter.plugin import PluginManager |
909 | 10 | 9 | ||
910 | 11 | class MockApp(object): | 10 | class MockApp(object): |
911 | 12 | 11 | ||
912 | === modified file 'test/test_ppa_iconfilename.py' | |||
913 | --- test/test_ppa_iconfilename.py 2011-12-19 12:25:59 +0000 | |||
914 | +++ test/test_ppa_iconfilename.py 2012-01-16 14:45:27 +0000 | |||
915 | @@ -1,9 +1,9 @@ | |||
916 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
917 | 2 | 2 | ||
918 | 3 | import sys | ||
919 | 4 | import unittest | 3 | import unittest |
920 | 5 | 4 | ||
922 | 6 | sys.path.insert(0,"../") | 5 | from testutils import setup_test_env |
923 | 6 | setup_test_env() | ||
924 | 7 | from softwarecenter.distro.Ubuntu import Ubuntu | 7 | from softwarecenter.distro.Ubuntu import Ubuntu |
925 | 8 | 8 | ||
926 | 9 | class MockCache(object): | 9 | class MockCache(object): |
927 | 10 | 10 | ||
928 | === modified file 'test/test_purchase_backend.py' | |||
929 | --- test/test_purchase_backend.py 2011-12-12 09:15:52 +0000 | |||
930 | +++ test/test_purchase_backend.py 2012-01-16 14:45:27 +0000 | |||
931 | @@ -1,17 +1,15 @@ | |||
932 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
933 | 2 | 2 | ||
934 | 3 | import os | 3 | import os |
935 | 4 | import sys | ||
936 | 5 | import time | 4 | import time |
937 | 6 | import unittest | 5 | import unittest |
938 | 7 | 6 | ||
939 | 8 | from gi.repository import GObject, Gtk | 7 | from gi.repository import GObject, Gtk |
940 | 9 | from mock import Mock | 8 | from mock import Mock |
941 | 10 | 9 | ||
944 | 11 | sys.path.insert(0, "..") | 10 | from testutils import setup_test_env |
945 | 12 | 11 | setup_test_env() | |
946 | 13 | from softwarecenter.db.application import Application | 12 | from softwarecenter.db.application import Application |
947 | 14 | |||
948 | 15 | from softwarecenter.backend import get_install_backend | 13 | from softwarecenter.backend import get_install_backend |
949 | 16 | 14 | ||
950 | 17 | #import softwarecenter.log | 15 | #import softwarecenter.log |
951 | 18 | 16 | ||
952 | === modified file 'test/test_reinstall_purchased.py' | |||
953 | --- test/test_reinstall_purchased.py 2011-08-25 19:22:13 +0000 | |||
954 | +++ test/test_reinstall_purchased.py 2012-01-16 14:45:27 +0000 | |||
955 | @@ -1,9 +1,5 @@ | |||
956 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
957 | 2 | 2 | ||
958 | 3 | |||
959 | 4 | import sys | ||
960 | 5 | sys.path.insert(0,"../") | ||
961 | 6 | |||
962 | 7 | import apt_pkg | 3 | import apt_pkg |
963 | 8 | import apt | 4 | import apt |
964 | 9 | import logging | 5 | import logging |
965 | @@ -11,6 +7,8 @@ | |||
966 | 11 | import unittest | 7 | import unittest |
967 | 12 | import xapian | 8 | import xapian |
968 | 13 | 9 | ||
969 | 10 | from testutils import setup_test_env | ||
970 | 11 | setup_test_env() | ||
971 | 14 | from softwarecenter.enums import XapianValues | 12 | from softwarecenter.enums import XapianValues |
972 | 15 | from softwarecenter.db.database import StoreDatabase | 13 | from softwarecenter.db.database import StoreDatabase |
973 | 16 | from softwarecenter.db.update import add_from_purchased_but_needs_reinstall_data | 14 | from softwarecenter.db.update import add_from_purchased_but_needs_reinstall_data |
974 | 17 | 15 | ||
975 | === modified file 'test/test_reviews.py' | |||
976 | --- test/test_reviews.py 2012-01-05 14:53:25 +0000 | |||
977 | +++ test/test_reviews.py 2012-01-16 14:45:27 +0000 | |||
978 | @@ -1,21 +1,16 @@ | |||
979 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
980 | 2 | 2 | ||
981 | 3 | import os | 3 | import os |
982 | 4 | import tempfile | ||
983 | 5 | import unittest | 4 | import unittest |
984 | 6 | 5 | ||
985 | 7 | import sys | ||
986 | 8 | sys.path.insert(0,"../") | ||
987 | 9 | |||
988 | 10 | from gi.repository import GObject | 6 | from gi.repository import GObject |
989 | 11 | 7 | ||
994 | 12 | import softwarecenter.paths | 8 | from testutils import setup_test_env |
995 | 13 | softwarecenter.paths.SOFTWARE_CENTER_CACHE_DIR = tempfile.mkdtemp() | 9 | setup_test_env() |
992 | 14 | softwarecenter.paths.datadir = "../data" | ||
993 | 15 | |||
996 | 16 | from softwarecenter.backend.reviews.rnr import ( | 10 | from softwarecenter.backend.reviews.rnr import ( |
997 | 17 | ReviewLoaderSpawningRNRClient as ReviewLoader) | 11 | ReviewLoaderSpawningRNRClient as ReviewLoader) |
999 | 18 | from softwarecenter.testutils import (get_test_pkg_info, get_test_db) | 12 | from softwarecenter.testutils import get_test_pkg_info, get_test_db |
1000 | 13 | |||
1001 | 19 | 14 | ||
1002 | 20 | class TestReviewLoader(unittest.TestCase): | 15 | class TestReviewLoader(unittest.TestCase): |
1003 | 21 | 16 | ||
1004 | 22 | 17 | ||
1005 | === modified file 'test/test_rnr_api.py' | |||
1006 | --- test/test_rnr_api.py 2011-06-21 15:57:45 +0000 | |||
1007 | +++ test/test_rnr_api.py 2012-01-16 14:45:27 +0000 | |||
1008 | @@ -1,10 +1,10 @@ | |||
1009 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1010 | 2 | 2 | ||
1011 | 3 | |||
1012 | 4 | import sys | ||
1013 | 5 | sys.path.insert(0,"../") | ||
1014 | 6 | |||
1015 | 7 | import unittest | 3 | import unittest |
1016 | 4 | |||
1017 | 5 | from testutils import setup_test_env | ||
1018 | 6 | setup_test_env() | ||
1019 | 7 | |||
1020 | 8 | from softwarecenter.backend.piston.rnrclient import RatingsAndReviewsAPI | 8 | from softwarecenter.backend.piston.rnrclient import RatingsAndReviewsAPI |
1021 | 9 | from softwarecenter.backend.piston.rnrclient_fake import RatingsAndReviewsAPI as RatingsAndReviewsAPIFake | 9 | from softwarecenter.backend.piston.rnrclient_fake import RatingsAndReviewsAPI as RatingsAndReviewsAPIFake |
1022 | 10 | 10 | ||
1023 | 11 | 11 | ||
1024 | === modified file 'test/test_scagent.py' | |||
1025 | --- test/test_scagent.py 2011-08-05 15:32:20 +0000 | |||
1026 | +++ test/test_scagent.py 2012-01-16 14:45:27 +0000 | |||
1027 | @@ -1,24 +1,18 @@ | |||
1028 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1029 | 2 | 2 | ||
1030 | 3 | from gi.repository import GObject | 3 | from gi.repository import GObject |
1031 | 4 | import os | ||
1032 | 5 | import os.path | ||
1033 | 6 | import unittest | 4 | import unittest |
1034 | 7 | 5 | ||
1038 | 8 | 6 | from testutils import setup_test_env | |
1039 | 9 | import sys | 7 | setup_test_env() |
1037 | 10 | sys.path.insert(0,"../") | ||
1040 | 11 | 8 | ||
1041 | 12 | from softwarecenter.backend.scagent import SoftwareCenterAgent | 9 | from softwarecenter.backend.scagent import SoftwareCenterAgent |
1042 | 13 | import softwarecenter.paths | ||
1043 | 14 | 10 | ||
1044 | 15 | class TestSCAgent(unittest.TestCase): | 11 | class TestSCAgent(unittest.TestCase): |
1045 | 16 | """ tests software-center-agent """ | 12 | """ tests software-center-agent """ |
1046 | 17 | 13 | ||
1047 | 18 | def setUp(self): | 14 | def setUp(self): |
1048 | 19 | self.loop = GObject.MainLoop(GObject.main_context_default()) | 15 | self.loop = GObject.MainLoop(GObject.main_context_default()) |
1049 | 20 | softwarecenter.paths.datadir = "../data" | ||
1050 | 21 | os.environ["PYTHONPATH"] = os.path.abspath("..") | ||
1051 | 22 | self.error = False | 16 | self.error = False |
1052 | 23 | 17 | ||
1053 | 24 | def on_query_done(self, scagent, data): | 18 | def on_query_done(self, scagent, data): |
1054 | 25 | 19 | ||
1055 | === modified file 'test/test_startup.py' | |||
1056 | --- test/test_startup.py 2011-03-11 19:14:20 +0000 | |||
1057 | +++ test/test_startup.py 2012-01-16 14:45:27 +0000 | |||
1058 | @@ -3,11 +3,11 @@ | |||
1059 | 3 | import pickle | 3 | import pickle |
1060 | 4 | import os | 4 | import os |
1061 | 5 | import subprocess | 5 | import subprocess |
1062 | 6 | import sys | ||
1063 | 7 | import time | 6 | import time |
1064 | 8 | import unittest | 7 | import unittest |
1065 | 9 | 8 | ||
1067 | 10 | sys.path.insert(0, "..") | 9 | from testutils import setup_test_env |
1068 | 10 | setup_test_env() | ||
1069 | 11 | 11 | ||
1070 | 12 | 12 | ||
1071 | 13 | # FIXME: | 13 | # FIXME: |
1072 | @@ -35,7 +35,6 @@ | |||
1073 | 35 | print self.revno_to_times_list | 35 | print self.revno_to_times_list |
1074 | 36 | 36 | ||
1075 | 37 | def create_ui_and_return_time_to_visible(self): | 37 | def create_ui_and_return_time_to_visible(self): |
1076 | 38 | os.environ["PYTHONPATH"] = ".." | ||
1077 | 39 | now = time.time() | 38 | now = time.time() |
1078 | 40 | # we get the time on stdout and detailed stats on stderr | 39 | # we get the time on stdout and detailed stats on stderr |
1079 | 41 | p = subprocess.Popen(["./software-center", "--measure-startup-time"], | 40 | p = subprocess.Popen(["./software-center", "--measure-startup-time"], |
1080 | 42 | 41 | ||
1081 | === modified file 'test/test_testutils.py' | |||
1082 | --- test/test_testutils.py 2011-08-19 19:45:36 +0000 | |||
1083 | +++ test/test_testutils.py 2012-01-16 14:45:27 +0000 | |||
1084 | @@ -7,8 +7,8 @@ | |||
1085 | 7 | import time | 7 | import time |
1086 | 8 | from gi.repository import GObject | 8 | from gi.repository import GObject |
1087 | 9 | 9 | ||
1090 | 10 | import sys | 10 | from testutils import setup_test_env |
1091 | 11 | sys.path.insert(0,"../") | 11 | setup_test_env() |
1092 | 12 | 12 | ||
1093 | 13 | from softwarecenter.testutils import start_dummy_backend, stop_dummy_backend | 13 | from softwarecenter.testutils import start_dummy_backend, stop_dummy_backend |
1094 | 14 | from softwarecenter.backend.installbackend_impl.aptd import get_dbus_bus | 14 | from softwarecenter.backend.installbackend_impl.aptd import get_dbus_bus |
1095 | 15 | 15 | ||
1096 | === modified file 'test/test_ubuntu_sso_api.py' | |||
1097 | --- test/test_ubuntu_sso_api.py 2012-01-05 15:26:28 +0000 | |||
1098 | +++ test/test_ubuntu_sso_api.py 2012-01-16 14:45:27 +0000 | |||
1099 | @@ -1,11 +1,10 @@ | |||
1100 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1101 | 2 | 2 | ||
1102 | 3 | |||
1103 | 4 | import sys | ||
1104 | 5 | sys.path.insert(0,"../") | ||
1105 | 6 | |||
1106 | 7 | import os | 3 | import os |
1107 | 8 | import unittest | 4 | import unittest |
1108 | 5 | |||
1109 | 6 | from testutils import setup_test_env | ||
1110 | 7 | setup_test_env() | ||
1111 | 9 | from softwarecenter.backend.ubuntusso import (UbuntuSSOAPIFake, | 8 | from softwarecenter.backend.ubuntusso import (UbuntuSSOAPIFake, |
1112 | 10 | UbuntuSSOAPI, | 9 | UbuntuSSOAPI, |
1113 | 11 | get_ubuntu_sso_backend, | 10 | get_ubuntu_sso_backend, |
1114 | 12 | 11 | ||
1115 | === modified file 'test/test_utils.py' | |||
1116 | --- test/test_utils.py 2011-11-04 14:52:52 +0000 | |||
1117 | +++ test/test_utils.py 2012-01-16 14:45:27 +0000 | |||
1118 | @@ -1,10 +1,11 @@ | |||
1119 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1120 | 2 | 2 | ||
1121 | 3 | import os | 3 | import os |
1122 | 4 | import sys | ||
1123 | 5 | import unittest | 4 | import unittest |
1126 | 6 | sys.path.insert(0,"../") | 5 | |
1127 | 7 | 6 | ||
1128 | 7 | from testutils import setup_test_env | ||
1129 | 8 | setup_test_env() | ||
1130 | 8 | from softwarecenter.utils import (decode_xml_char_reference, | 9 | from softwarecenter.utils import (decode_xml_char_reference, |
1131 | 9 | release_filename_in_lists_from_deb_line, | 10 | release_filename_in_lists_from_deb_line, |
1132 | 10 | get_http_proxy_string_from_libproxy, | 11 | get_http_proxy_string_from_libproxy, |
1133 | 11 | 12 | ||
1134 | === modified file 'test/test_where_is_it.py' | |||
1135 | --- test/test_where_is_it.py 2011-08-19 09:56:15 +0000 | |||
1136 | +++ test/test_where_is_it.py 2012-01-16 14:45:27 +0000 | |||
1137 | @@ -1,10 +1,10 @@ | |||
1138 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1139 | 2 | 2 | ||
1140 | 3 | import os | 3 | import os |
1141 | 4 | import sys | ||
1142 | 5 | import unittest | 4 | import unittest |
1143 | 6 | sys.path.insert(0,"../") | ||
1144 | 7 | 5 | ||
1145 | 6 | from testutils import setup_test_env | ||
1146 | 7 | setup_test_env() | ||
1147 | 8 | from softwarecenter.paths import XAPIAN_BASE_PATH | 8 | from softwarecenter.paths import XAPIAN_BASE_PATH |
1148 | 9 | from softwarecenter.ui.gtk3.gmenusearch import GMenuSearcher | 9 | from softwarecenter.ui.gtk3.gmenusearch import GMenuSearcher |
1149 | 10 | from softwarecenter.db.pkginfo import get_pkg_info | 10 | from softwarecenter.db.pkginfo import get_pkg_info |
1150 | 11 | 11 | ||
1151 | === modified file 'test/test_xapian.py' | |||
1152 | --- test/test_xapian.py 2011-06-06 08:49:12 +0000 | |||
1153 | +++ test/test_xapian.py 2012-01-16 14:45:27 +0000 | |||
1154 | @@ -1,12 +1,12 @@ | |||
1155 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1156 | 2 | 2 | ||
1157 | 3 | |||
1158 | 4 | import sys | ||
1159 | 5 | sys.path.insert(0,"../") | ||
1160 | 6 | |||
1161 | 7 | import unittest | 3 | import unittest |
1162 | 8 | import os | 4 | import os |
1163 | 9 | import xapian | 5 | import xapian |
1164 | 6 | |||
1165 | 7 | from testutils import setup_test_env | ||
1166 | 8 | setup_test_env() | ||
1167 | 9 | |||
1168 | 10 | from softwarecenter.enums import XapianValues | 10 | from softwarecenter.enums import XapianValues |
1169 | 11 | from softwarecenter.db.update import rebuild_database | 11 | from softwarecenter.db.update import rebuild_database |
1170 | 12 | 12 | ||
1171 | 13 | 13 | ||
1172 | === added symlink 'test/testutils.py' | |||
1173 | === target is u'../softwarecenter/testutils.py' | |||
1174 | === modified file 'test/xapian_query.py' | |||
1175 | --- test/xapian_query.py 2011-05-18 08:26:04 +0000 | |||
1176 | +++ test/xapian_query.py 2012-01-16 14:45:27 +0000 | |||
1177 | @@ -6,6 +6,9 @@ | |||
1178 | 6 | 6 | ||
1179 | 7 | from softwarecenter.enums import XAPIAN_VALUE_POPCON | 7 | from softwarecenter.enums import XAPIAN_VALUE_POPCON |
1180 | 8 | 8 | ||
1181 | 9 | from testutils import setup_test_env | ||
1182 | 10 | setup_test_env() | ||
1183 | 11 | |||
1184 | 9 | if __name__ == "__main__": | 12 | if __name__ == "__main__": |
1185 | 10 | 13 | ||
1186 | 11 | search_term = sys.argv[1] | 14 | search_term = sys.argv[1] |
Looks good.