class TestFieldCompare: def setup(self): self.first = Field() self.first.set_value('abc') self.second = Field() self.second.set_value('def') def test_compare(self): assert self.first != self.second assert self.first != 'abc123' def test_compare_empty(self): empty = Field() assert not self.first.empty() assert empty.empty()
def test_compare_empty(self): empty = Field() assert not self.first.empty() assert empty.empty()
def setup(self): self.first = Field() self.first.set_value('abc') self.second = Field() self.second.set_value('def')
def test_create_by_both(self): field = Field('args_value', value='kwargs_value') assert field.value == 'args_value'
def test_create_by_kwargs(self): field = Field(value=self.value) assert field.value == self.value