How to use the parliament.statement.is_valid_region function in parliament

To help you get started, we’ve selected a few parliament examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")
github duo-labs / parliament / tests / unit / test_resource_formatting.py View on Github external
def test_is_valid_region(self):
        assert_true(is_valid_region(""), "Empty regions are allowed")
        assert_true(is_valid_region("us-east-1"), "This region is allowed")
        assert_false(is_valid_region("us-east-1f"), "This is an AZ, not a region")
        assert_false(is_valid_region("us-east-*"), "No regexes in regions")
        assert_false(is_valid_region("us"), "Not a valid region")
        assert_false(is_valid_region("us-east-1-f"), "Not a valid region")
        assert_true(is_valid_region("us-gov-east-1"), "This is a valid govcloud region")