def test_menu_create_invalid_entity(self): with mock.patch("builtins.input", side_effect=["1", self.invalid_entity, '', "0"]): menu.menu(D) self.entities = E.Entities( # Must reassign because # menu.menu sets up its own 'entities'. *E.get_file_info(D), defaults=D) self.assertEqual(self.starting_list.sort(), self.entities.lst.sort())
def test_menu_create_newEntity(self): with mock.patch("builtins.input", side_effect=["1", self.new_entity, '', '', '']): menu.menu(D) self.entities = E.Entities( # Must reassign because # menu.menu sets up its own 'entities'. *E.get_file_info(D), defaults=D) expected_list = self.starting_list[:] expected_list.append(self.new_entity) self.assertTrue((sorted(self.entities.lst) == sorted(expected_list)) and (self.entities.default == self.new_entity))
""" * Email Scraper * Author: Sanjay Sunil (a.k.a D3VSJ) * License: MIT """ import src.menu as app # Menu app.menu()