~lderan/ubuntu-autopilot-tests/ubuntu-autopilot-tests

« back to all changes in this revision

Viewing changes to xubuntu_autopilot_tests/gthumb/__init__.py

  • Committer: Thomas Molloy
  • Date: 2014-03-22 10:30:07 UTC
  • Revision ID: beetyrootey@gmail.com-20140322103007-rh3p3r1rmh3srb23
fixes for the xubuntu tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
 
#
3
 
# Copyright (C) 2013
4
 
#
5
 
# Author: Daniel Chapman daniel@chapman-mail.com
6
 
#
7
 
# This program is free software; you can redistribute it and/or modify
8
 
# it under the terms of the GNU Lesser General Public License as published by
9
 
# the Free Software Foundation; version 3.
10
 
#
11
 
# This program is distributed in the hope that it will be useful,
12
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 
# GNU Lesser General Public License for more details.
15
 
#
16
 
# You should have received a copy of the GNU Lesser General Public License
17
 
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
 
from autopilot.testcase import AutopilotTestCase
19
 
from autopilot.matchers import Eventually
20
 
from testtools.matchers import Equals, Contains, FileExists, DirExists
21
 
import tempfile
22
 
import os
23
 
 
24
 
 
25
 
HOME_DIR = os.getenv('HOME')
26
 
 
27
 
 
28
 
class TerminalAutopilotTestCase(AutopilotTestCase):
29
 
 
30
 
    def setUp(self):
31
 
        super(TerminalAutopilotTestCase, self).setUp()
32
 
        # print(HOME_DIR)
33
 
        self.app = self.launch_test_application('gnome-terminal',
34
 
                                                '--working-directory=' +
35
 
                                                HOME_DIR,
36
 
                                                '--disable-factory'
37
 
                                                )
38
 
 
39
 
    def create_temp_directory_with_temp_files(self):
40
 
        """ Creates a temp directory with temp files 'a' 'b' and 'c' """
41
 
        self.keyboard.type('mkdir /tmp/temp-dir\n')
42
 
        self.keyboard.type('touch /tmp/temp-dir/a\n')
43
 
        self.keyboard.type('touch /tmp/temp-dir/b\n')
44
 
        self.keyboard.type('touch /tmp/temp-dir/c\n')
 
1
# -*- coding: utf-8 -*-
 
2