~ubuntu-branches/ubuntu/trusty/python-boto/trusty

« back to all changes in this revision

Viewing changes to tests/db/test_lists.py

  • Committer: Package Import Robot
  • Author(s): Eric Evans
  • Date: 2013-05-10 23:38:14 UTC
  • mfrom: (1.1.10) (14.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130510233814-701dvlop7xfh88i7
Tags: 2.9.2-1
New upstream release (Closes: #700743).

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    def test_list_order(self):
47
47
        """Testing the order of lists"""
48
48
        t = SimpleListModel()
49
 
        t.nums = [5,4,1,3,2]
 
49
        t.nums = [5, 4, 1, 3, 2]
50
50
        t.strs = ["B", "C", "A", "D", "Foo"]
51
51
        t.put()
52
52
        self.objs.append(t)
53
53
        time.sleep(3)
54
54
        t = SimpleListModel.get_by_id(t.id)
55
 
        assert(t.nums == [5,4,1,3,2])
 
55
        assert(t.nums == [5, 4, 1, 3, 2])
56
56
        assert(t.strs == ["B", "C", "A", "D", "Foo"])
57
57
 
58
58
    def test_old_compat(self):
66
66
        item.save()
67
67
        time.sleep(3)
68
68
        t = SimpleListModel.get_by_id(t.id)
69
 
        i1 = item['strs']
70
 
        i1.sort()
 
69
        i1 = sorted(item['strs'])
71
70
        i2 = t.strs
72
71
        i2.sort()
73
72
        assert(i1 == i2)
82
81
        time.sleep(3)
83
82
        assert(SimpleListModel.find(strs="Bizzle").count() == 1)
84
83
        assert(SimpleListModel.find(strs="Bar").count() == 1)
85
 
        assert(SimpleListModel.find(strs=["Bar","Bizzle"]).count() == 1)
 
84
        assert(SimpleListModel.find(strs=["Bar", "Bizzle"]).count() == 1)
86
85
 
87
86
    def test_query_not_equals(self):
88
87
        """Test a not equal filter"""