예제 #1
0
    def test_ne__if_other_object_type__should_return_true(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.__ne__(val) is True
예제 #2
0
    def test_ne__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.__ne__(other_obj) == expect