def test_invalid_data(self):
        """Check passing invalid data"""

        args = ["", "2001::1.999.0", 10]
        kwargs = {}
        with self.assertRaises(AnsibleFilterError) as error:
            _ipmath(*args, **kwargs)
        self.assertIn("You must pass a valid IP address", str(error.exception))
    def test_find_previous_fifth_address_ipv6(self):
        """Get the previous fifth address in ipv6"""

        args = ["", "2001::5", -10]
        result = _ipmath(*args)
        self.assertEqual(result, "2000:ffff:ffff:ffff:ffff:ffff:ffff:fffb")
    def test_find_next_fifth_address_ipv6(self):
        """Get the next fifth address in ipv6"""

        args = ["", "2001::1", 10]
        result = _ipmath(*args)
        self.assertEqual(result, "2001::b")
    def test_find_previous_fifth_address_cidr(self):
        """Get the previous fifth address CIDR notation"""

        args = ["", "192.168.1.6/24", -5]
        result = _ipmath(*args)
        self.assertEqual(result, "192.168.1.1")
    def test_find_next_fifth_address_cidr(self):
        """Get the next fifth address CIDR notation"""

        args = ["", "192.168.1.1/24", 5]
        result = _ipmath(*args)
        self.assertEqual(result, "192.168.1.6")
    def test_find_previous_fifth_address(self):
        """Get the previous fifth address """

        args = ["", "192.168.1.5", -10]
        result = _ipmath(*args)
        self.assertEqual(result, "192.168.0.251")
    def test_find_next_fifth_address(self):
        """Get the next fifth address based on an IP address"""

        args = ["", "192.168.1.5", 5]
        result = _ipmath(*args)
        self.assertEqual(result, "192.168.1.10")