~ubuntu-branches/ubuntu/precise/desktopcouch/precise

« back to all changes in this revision

Viewing changes to desktopcouch/bookmarks/tests/test_record.py

  • Committer: Bazaar Package Importer
  • Author(s): Chad MILLER
  • Date: 2011-01-12 15:08:25 UTC
  • mfrom: (1.5.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110112150825-bzvn23kzufr0qdyb
Tags: 1.0.5-0ubuntu1
* New upstream release, skipping a few buggy releases.
* Split code into binary packages:
  - desktopcouch, configuration files and dependencies, but no code.
  - python-desktopcouch: transitional package
  - python-desktopcouch-application: local DB startup and discovery
  - python-desktopcouch-records: library for DB access anywhere
  - python-desktopcouch-recordtypes: support specific data structures
  - desktopcouch-ubuntuone, replication and pairing with cloud service
* Drop patch that some maverick apps incorrectly needed.
  patches/0-items-should-expose-private-data-for-now.patch
* Update package compatibility-version, 6 -> 7.
* Use newer debhelper and use python-support instead of python-central.
* Depend on contemporary python-couchdb, instead of ancient version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2010 Canonical Ltd.
2
 
#
3
 
# This file is part of desktopcouch-bookmarks.
4
 
#
5
 
#  desktopcouch is free software: you can redistribute it and/or modify
6
 
# it under the terms of the GNU Lesser General Public License version 3
7
 
# as published by the Free Software Foundation.
8
 
#
9
 
# desktopcouch is distributed in the hope that it will be useful,
10
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
# GNU Lesser General Public License for more details.
13
 
#
14
 
# You should have received a copy of the GNU Lesser General Public License
15
 
# along with desktopcouch.  If not, see <http://www.gnu.org/licenses/>.
16
 
#
17
 
# Authors: Zachery Bir <zachery.bir@canonical.com>
18
 
#          Joshua Blount <joshua.blount@canonical.com>
19
 
 
20
 
"""Tests for the Bookmarks record classes"""
21
 
 
22
 
import testtools
23
 
 
24
 
from desktopcouch.bookmarks.record import \
25
 
    Bookmark, BOOKMARK_RECORD_TYPE, \
26
 
    Folder, FOLDER_RECORD_TYPE, \
27
 
    Separator, SEPARATOR_RECORD_TYPE, \
28
 
    Feed, FEED_RECORD_TYPE
29
 
 
30
 
class TestBookmarkRecord(testtools.TestCase):
31
 
    """Test the Bookmark Record object."""
32
 
 
33
 
    def test_bookmark_record(self):
34
 
        """Test that we get the correct record type."""
35
 
        bookmark = Bookmark()
36
 
        self.assertEqual(BOOKMARK_RECORD_TYPE, bookmark.record_type)
37
 
 
38
 
class TestFolderRecord(testtools.TestCase):
39
 
    """Test the Folder Record object."""
40
 
 
41
 
    def test_folder_record(self):
42
 
        """Test that we get the correct record type."""
43
 
        folder = Folder()
44
 
        self.assertEqual(FOLDER_RECORD_TYPE, folder.record_type)
45
 
 
46
 
class TestSeparatorRecord(testtools.TestCase):
47
 
    """Test the Separator Record object."""
48
 
 
49
 
    def test_separator_record(self):
50
 
        """Test that we get the correct record type."""
51
 
        separator = Separator()
52
 
        self.assertEqual(SEPARATOR_RECORD_TYPE, separator.record_type)
53
 
 
54
 
class TestFeedRecord(testtools.TestCase):
55
 
    """Test the Feed Record object."""
56
 
 
57
 
    def test_feed_record(self):
58
 
        """Test that we get the correct record type."""
59
 
        feed = Feed()
60
 
        self.assertEqual(FEED_RECORD_TYPE, feed.record_type)