def default_task_as_dictionary(self): task = self.default_task() dictionary = task.as_dictionary() Assert.equals(dictionary, { 'uuid': task.get_uuid(), 'content': 'Hello', 'completed': False }) return dictionary
def examples_equality(self): foo = self.foo_example() bar = self.bar_example() Assert.not_equals(foo, bar) return foo == bar
def bar_example(self): bar = GtExample(Haba, Haba.bar) Assert.equals(bar.get_class(), Haba) Assert.equals(bar.get_name(), 'bar') Assert.equals(bar.get_method(), Haba.bar) return bar
def foo_example(self): foo = GtExample(Haba, Haba.foo) Assert.equals(foo.get_class(), Haba) Assert.equals(foo.get_name(), 'foo') Assert.equals(foo.get_method(), Haba.foo) return foo
def default_task(self): task = Task('Hello') Assert.equals(task.get_content(), 'Hello') Assert.equals(task.is_completed(), False) return task
def task_be_completed(self): task = self.default_task() task.be_completed() Assert.equals(task.is_completed(), True) return task
def task_set_content(self): task = self.default_task() task.set_content('World') Assert.equals(task.get_content(), 'World') return task