~thomir-deactivatedaccount/ubuntu-calendar-app/trunk-fix-ugly-bits

« back to all changes in this revision

Viewing changes to tests/autopilot/calendar_app/tests/__init__.py

  • Committer: Thomi Richards
  • Date: 2014-05-27 14:52:58 UTC
  • Revision ID: thomi.richards@canonical.com-20140527145258-fz8ujw193ath466z
Fixed bug where '~' was not being expanded, and cleaned up some other code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    else:
49
49
        scenarios = [('with touch', dict(input_device_class=Touch))]
50
50
 
51
 
    local_location = os.path.dirname(os.path.dirname(os.getcwd()))
52
 
    local_location_qml = local_location + "/calendar.qml"
 
51
    local_location_qml = os.path.join(os.getcwd(), '..', '..', 'calendar.qml')
53
52
    installed_location_qml = "/usr/share/calendar-app/calendar.qml"
54
53
 
55
54
    def get_launcher_and_type(self):
120
119
        #click requires apparmor profile, and writing to special dir
121
120
        #but the desktop can write to a traditional /tmp directory
122
121
        if self.test_type == 'click':
123
 
            temp_dir = os.path.join('~', 'autopilot', 'fakeenv')
 
122
            temp_dir = os.path.join(
 
123
                os.path.expanduser('~'),
 
124
                'autopilot',
 
125
                'fakeenv'
 
126
            )
124
127
            logger.debug(temp_dir)
125
128
            temp_dir_fixture = fixtures.TempDir(temp_dir)
126
129
        else: