~bertrand-rousseau/gtg/new-task-list-layout

« back to all changes in this revision

Viewing changes to GTG/tests/test_backends.py

  • Committer: Bertrand Rousseau
  • Date: 2012-07-13 17:24:28 UTC
  • mfrom: (1178.1.28 trunk)
  • mto: (1178.1.30 trunk)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: bertrand.rousseau@gmail.com-20120713172428-ou3ic646fccov41d
Merge with trunk. Fixes conflict with CHANGELOG.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
# -----------------------------------------------------------------------------
19
19
 
20
 
"""Tests for GTG backends.
 
20
""" Tests for GTG backends.
21
21
 
22
22
Some of these tests will generate files in
23
23
xdg.BaseDirectory.xdg_data_home/gtg directory.
43
43
        self.datafile = ''
44
44
        self.taskpath = ''
45
45
        self.datapath = ''
46
 
    
 
46
 
47
47
    def SetUp(self):
48
48
        CoreConfig().set_data_dir("./test_data")
49
49
        CoreConfig().set_conf_dir("./test_data")
64
64
        expectedres = "Your tasks are saved"
65
65
        self.assertEqual(res[:len(expectedres)], expectedres)
66
66
 
67
 
 
68
67
    def test_localfile_get_static_parameters(self):
69
68
        """Tests for localfile/get_static_parameters function:
70
69
        - a string is expected.
80
79
        expectedres = "readwrite"
81
80
        self.assertEqual(res, expectedres)
82
81
 
83
 
 
84
82
    def test_localfile_backend_method3(self):
85
83
        """Tests for localfile/Backend/remove_task method:
86
84
        - parse task file to check if task has been removed.