Exemplo n.º 1
0
    def test_eq__if_other_object_type__should_return_false(self, val):
        obj = ZKDevice(mac='00:17:61:C8:EC:17',
                       ip='192.168.1.201',
                       serial_number='DGD9190019050335134',
                       model=ZK400,
                       version='AC Ver 4.3.4 Apr 28 2017')

        assert obj.__eq__(val) is False
Exemplo n.º 2
0
    def test_eq__should_return_comparing_result(self, attributes, expect):
        init = {
            'mac': '00:17:61:C8:EC:17',
            'ip': '192.168.1.201',
            'serial_number': 'DGD9190019050335134',
            'model': ZK400,
            'version': 'AC Ver 4.3.4 Apr 28 2017'
        }
        obj = ZKDevice(**init)
        init.update(attributes)
        other_obj = ZKDevice(**init)

        assert obj.__eq__(other_obj) == expect