~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: Tarmac
  • Author(s): Nicholas Skaggs, nskaggs
  • Date: 2014-05-23 10:31:23 UTC
  • mfrom: (271.1.12 fix-ap-flo)
  • Revision ID: tarmac-20140523103123-3g41lntp863ca5yf
Fix bug 1319382 and bug 1319373. Fixes: https://bugs.launchpad.net/bugs/1319373, https://bugs.launchpad.net/bugs/1319382, https://bugs.launchpad.net/bugs/1321775.

Approved by Kunal Parmar, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
    def _patch_home(self):
118
118
        """ mock /home for testing purposes to preserve user data
119
119
        """
120
 
        temp_dir_fixture = fixtures.TempDir()
 
120
        #click requires apparmor profile, and writing to special dir
 
121
        #but the desktop can write to a traditional /tmp directory
 
122
        if self.test_type == 'click':
 
123
            temp_dir = os.path.join('~', 'autopilot', 'fakeenv')
 
124
            logger.debug(temp_dir)
 
125
            temp_dir_fixture = fixtures.TempDir(temp_dir)
 
126
        else:
 
127
            temp_dir_fixture = fixtures.TempDir()
121
128
        self.useFixture(temp_dir_fixture)
122
129
        temp_dir = temp_dir_fixture.path
 
130
        logger.debug(temp_dir)
123
131
 
124
132
        #If running under xvfb, as jenkins does,
125
133
        #xsession will fail to start without xauthority file