Exemplo n.º 1
0
 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())
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
"""
 * Email Scraper
 * Author: Sanjay Sunil (a.k.a D3VSJ)
 * License: MIT
"""

import src.menu as app

# Menu
app.menu()