view tests/test-forget.py @ 89:351d2799f145

client: added context manager protocol methods This allows client objects to be used with the 'with' statement and be closed automatically when the 'with' context exits.
author Jeff Laughlin <jmlaughlin@integrated-informatics.com>
date Wed, 23 Nov 2011 09:57:37 -0500
parents ee8863882aae
children 4359cabcb0cc
line wrap: on
line source

import common

class test_forget(common.basetest):
    def test_basic(self):
        self.append('a', 'a')
        self.client.add(['a'])
        self.assertTrue(self.client.forget('a'))

    def test_warnings(self):
        self.assertFalse(self.client.forget('a'))
        self.append('a', 'a')
        self.client.add(['a'])
        self.assertFalse(self.client.forget(['a', 'b']))