~mvo/software-center/piston-generic-helper-offline-mode

« back to all changes in this revision

Viewing changes to test/gtk3/test_debfile_view.py

  • Committer: Michael Vogt
  • Date: 2012-05-22 12:13:02 UTC
  • mfrom: (2989.5.27 5.2)
  • Revision ID: michael.vogt@ubuntu.com-20120522121302-g89pbzfydf0zc3vw
merge the 5.2 branch in

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import time
4
4
import unittest
5
5
 
6
 
from mock import Mock
7
 
 
8
 
from testutils import setup_test_env, do_events
 
6
from testutils import do_events, get_mock_options, setup_test_env
9
7
setup_test_env()
10
8
 
11
9
import softwarecenter.paths
12
10
from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
13
11
from softwarecenter.ui.gtk3.panes.availablepane import AvailablePane
14
12
 
 
13
 
15
14
class DebFileOpenTestCase(unittest.TestCase):
16
15
 
17
16
    def test_deb_file_view_error(self):
18
 
        mock_options = Mock()
19
 
        mock_options.display_navlog = False
20
 
        mock_options.disable_apt_xapian_index = False
21
 
        mock_options.disable_buy = False
 
17
        mock_options = get_mock_options()
22
18
        xapianpath = softwarecenter.paths.XAPIAN_BASE_PATH
23
19
        app = SoftwareCenterAppGtk3(
24
20
            softwarecenter.paths.datadir, xapianpath, mock_options)
37
33
        # this is deb that is not installable
38
34
        action_button = app.available_pane.app_details_view.pkg_statusbar.button
39
35
        self.assertFalse(action_button.get_property("visible"))
40
 
        
41
36
 
42
37
 
43
38
if __name__ == "__main__":