def test_append(self): Accessor.append('test.txt', 'hello there', False) self.assertEqual(self.mock.last, { 'file': 'test.txt', 'append': 'hello there', 'sudo': False })