class Dummy_help_dialog: # Mock for testing the following methods of help_dialog menu_ok = help_dialog.menu_ok path_ok = help_dialog.path_ok ok = help_dialog.ok cancel = help_dialog.cancel # Attributes, constant or variable, needed for tests menu = Var() entryMenu = Entry() path = Var() entryPath = Entry() result = None destroyed = False def destroy(self): self.destroyed = True
class Dummy_CustomRun: entry_ok = query.CustomRun.entry_ok entry_error = {} restartvar = Var() def cli_args_ok(self): return self.cli_args
class Dummy_grep: grep_it = GrepDialog.grep_it.im_func findfiles = GrepDialog.findfiles.im_func recvar = Var(False) engine = searchengine def close(self): pass
class Dummy_HelpSource: path_ok = query.HelpSource.path_ok path = Var() path_error = {} def __init__(self, dummy_path): self.path.set(dummy_path) self.path_error['text'] = '' def showerror(self, message, widget=None): self.path_error['text'] = message
class Dummy_ModuleName: entry_ok = query.ModuleName.entry_ok # Function being tested. text0 = '' entry = Var() entry_error = {} def __init__(self, dummy_entry): self.entry.set(dummy_entry) self.entry_error['text'] = '' def showerror(self, message): self.entry_error['text'] = message
class Dummy_grep: # Methods tested #default_command = GrepDialog.default_command grep_it = GrepDialog.grep_it findfiles = GrepDialog.findfiles # Other stuff needed recvar = Var(False) engine = searchengine def close(self): # gui method pass
class Dummy_SectionName: entry_ok = query.SectionName.entry_ok # Function being tested. used_names = ['used'] entry = Var() entry_error = {} def __init__(self, dummy_entry): self.entry.set(dummy_entry) self.entry_error['text'] = '' def showerror(self, message): self.entry_error['text'] = message
class Dummy_Query: # Test the following Query methods. entry_ok = query.Query.entry_ok ok = query.Query.ok cancel = query.Query.cancel # Add attributes needed for the tests. entry = Var() result = None destroyed = False def destroy(self): self.destroyed = True
class Dummy_name_dialog(object): name_ok = name_dialog.name_ok.im_func Ok = name_dialog.Ok.im_func Cancel = name_dialog.Cancel.im_func used_names = ['used'] name = Var() result = None destroyed = False def destroy(self): self.destroyed = True
class Dummy_Query: # Mock for testing the following methods Query entry_ok = Query.entry_ok ok = Query.ok cancel = Query.cancel # Attributes, constant or variable, needed for tests entry = Var() result = None destroyed = False def destroy(self): self.destroyed = True
class Dummy_name_dialog: # Mock for testing the following methods of name_dialog name_ok = name_dialog.name_ok Ok = name_dialog.Ok Cancel = name_dialog.Cancel # Attributes, constant or variable, needed for tests used_names = ['used'] name = Var() result = None destroyed = False def destroy(self): self.destroyed = True
class Dummy_name_dialog(object): # Mock for testing the following methods of name_dialog name_ok = name_dialog.name_ok.im_func Ok = name_dialog.Ok.im_func Cancel = name_dialog.Cancel.im_func # Attributes, constant or variable, needed for tests used_names = ['used'] name = Var() result = None destroyed = False def grab_release(self): pass def destroy(self): self.destroyed = True
class Dummy_Query: # Test the following Query methods. entry_ok = query.Query.entry_ok ok = query.Query.ok cancel = query.Query.cancel # Add attributes and initialization needed for tests. entry = Var() entry_error = {} def __init__(self, dummy_entry): self.entry.set(dummy_entry) self.entry_error['text'] = '' self.result = None self.destroyed = False def showerror(self, message): self.entry_error['text'] = message def destroy(self): self.destroyed = True
class Dummy_Query: entry_ok = query.Query.entry_ok ok = query.Query.ok cancel = query.Query.cancel entry = Var() entry_error = {} def __init__(self, dummy_entry): self.entry.set(dummy_entry) self.entry_error['text'] = '' self.result = None self.destroyed = False def showerror(self, message): self.entry_error['text'] = message def destroy(self): self.destroyed = True
class Dummy_HelpSource: browse_file = query.HelpSource.browse_file pathvar = Var()
def __init__(self, dummy_entry): self.entry = Var(value=dummy_entry) self.entry_error = {'text': ''}
def __init__(self, dummy_entry): self.entry = Var(value=dummy_entry) self.entry_error = {'text': ''} self.result = None self.destroyed = False
class Dummy_SectionName: # Mock for testing the following method of Section_Name entry_ok = SectionName.entry_ok # Attributes, constant or variable, needed for tests used_names = ['used'] entry = Var()
def __init__(self, dummy_path): self.path = Var(value=dummy_path) self.path_error = {'text': ''}
class Dummy_SectionName: entry_ok = query.SectionName.entry_ok # Function being tested. used_names = ['used'] entry = Var()
class Dummy_ModuleName: entry_ok = query.ModuleName.entry_ok # Funtion being tested. text0 = '' entry = Var()
class Dummy_HelpSource: path_ok = query.HelpSource.path_ok path = Var()