Beispiel #1
0
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()
Beispiel #2
0
    def test_compare_empty(self):
        empty = Field()

        assert not self.first.empty()
        assert empty.empty()
Beispiel #3
0
 def setup(self):
     self.first = Field()
     self.first.set_value('abc')
     self.second = Field()
     self.second.set_value('def')
Beispiel #4
0
    def test_create_by_both(self):
        field = Field('args_value', value='kwargs_value')

        assert field.value == 'args_value'
Beispiel #5
0
    def test_create_by_kwargs(self):
        field = Field(value=self.value)

        assert field.value == self.value