class GmpCloneNoteTestCase(unittest.TestCase): def setUp(self): self.connection = MockConnection() self.gmp = Gmp(self.connection) def test_clone(self): self.gmp.clone_note('a1') self.connection.send.has_been_called_with('<create_note>' '<copy>a1</copy>' '</create_note>') def test_missing_id(self): with self.assertRaises(RequiredArgument): self.gmp.clone_note('') with self.assertRaises(RequiredArgument): self.gmp.clone_note(None)