def create_problem(self): prob = problem.Runtime(reason='Front fell off') prob._proxy = self.proxy return prob
def test_items(self): prob = problem.Runtime('Massive error') assert prob.items() == prob._data.items()
def test_items(self): prob = problem.Runtime('Massive error') tools.eq_(prob.items(), prob._data.items())
import problem prob = problem.Runtime(reason='egg_error_message: assertion "error" failed', ) prob.add_current_process_data() prob.add_current_environment() prob.save()
import problem prob = problem.Runtime( reason='Error getting devices:' 'GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: ' 'No such interface `org.gnome.SettingsDaemon.Power` on object at path ' '/org/gnome/SettingsDaemon/Power') prob.add_current_process_data() prob.custom_data = 'any' prob['dict_access_example'] = 'works' print(prob) print('') for key, value in prob.items(): print('{0}={1}'.format(key, value)) print('Identifier:', prob.save())