def test_delete_deck_nonExistingDeck(self): handler = DeckHandler(self.new_dir) self.assertEqual(len(self.test_files_dict), len(os.listdir(self.new_dir))) userId = "" deckId = 'xyz' # xyz is not the id response = handler.delete_deck(userId, deckId) self.assertEqual(len(self.test_files_dict), len(os.listdir(self.new_dir))) self.assertFalse(response)
def test_delete_deck(self): handler = DeckHandler(self.new_dir) self.assertEqual(len(self.test_files_dict), len(os.listdir(self.new_dir))) userId = "Tester" deckId = 'valide' response = handler.delete_deck(userId, deckId) self.assertEqual(len(self.test_files_dict)-1, len(os.listdir(self.new_dir))) self.assertTrue(response)