~james-w/desktopcouch/0.4.1

« back to all changes in this revision

Viewing changes to desktopcouch/contacts/tests/test_contactspicker.py

  • Committer: Ken VanDine
  • Date: 2009-09-23 18:23:42 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: ken.vandine@canonical.com-20090923182342-5rr1sdr8e9gyyxpt
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import testtools
22
22
import gtk
 
23
 
 
24
from desktopcouch.tests import xdg_cache
 
25
 
23
26
from desktopcouch.contacts.contactspicker import ContactsPicker
24
27
from desktopcouch.records.server import CouchDatabase
25
 
from desktopcouch.records.tests import get_uri
26
 
 
27
 
URI = get_uri()
28
28
 
29
29
class TestContactsPicker(testtools.TestCase):
30
30
    """Test the Contact Picker Window."""
32
32
    def setUp(self):
33
33
        """setup each test"""
34
34
        # Connect to CouchDB server
 
35
        self.assert_(xdg_cache)
35
36
        self.dbname = 'contacts'
36
 
        self.database = CouchDatabase(self.dbname, create=True, uri=URI)
 
37
        self.database = CouchDatabase(self.dbname, create=True)
37
38
 
38
39
    def tearDown(self):
39
40
        """tear down each test"""
48
49
        win.resize(300, 450)
49
50
 
50
51
        # Create the contacts picker widget
51
 
        picker = ContactsPicker(uri=URI)
 
52
        picker = ContactsPicker()
52
53
        win.get_content_area().pack_start(picker, True, True, 3)
53
54
        self.assert_(picker.get_contacts_list())
54
 
 
55