~nataliabidart/ubuntuone-client/credentials-shutdown

« back to all changes in this revision

Viewing changes to tests/syncdaemon/test_u1fsfsm.py

  • Committer: Rodney Dawes
  • Date: 2009-05-12 13:36:05 UTC
  • Revision ID: rodney.dawes@canonical.com-20090512133605-6aqs6e8xnnmp5u1p
        Import the code
        Hook up lint/trial tests in setup.py
        Use icontool now instead of including the render script
        Add missing python-gnome2-desktop to package dependencies
        Update debian/rules to fix the icon cache issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# canonical.ubuntuone.storage.syncdaemon.tests.test_u1fsfsm
 
2
#
 
3
# Author: Lucio Torre <lucio.torre@canonical.com>
 
4
#
 
5
# Copyright 2009 Canonical Ltd.
 
6
#
 
7
# This program is free software: you can redistribute it and/or modify it
 
8
# under the terms of the GNU General Public License version 3, as published
 
9
# by the Free Software Foundation.
 
10
#
 
11
# This program is distributed in the hope that it will be useful, but
 
12
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
13
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
14
# PURPOSE.  See the GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License along
 
17
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
"""
 
19
tests the u1fs fsm
 
20
"""
 
21
import unittest
 
22
import os
 
23
 
 
24
 
 
25
from canonical.ubuntuone.storage.syncdaemon.fsm import fsm
 
26
 
 
27
def p(name):
 
28
    """make a full path from here."""
 
29
    return os.path.join(os.path.dirname(fsm.__file__), name)
 
30
 
 
31
class TestParse(unittest.TestCase):
 
32
    'Test fsm validation'
 
33
 
 
34
    def test_u1fsfsm(self):
 
35
        'test parsing a simple machine'
 
36
        f = fsm.StateMachine(p("../u1fsfsm.py"))
 
37
        f.validate()
 
38
 
 
39
if __name__ == "__main__":
 
40
    unittest.main()