Exemplo n.º 1
0
    def test_select_bucket_region(self):
        tests = (
            (("myBucket", "us-east-1", "us-west-1", "eu-west-1"), "us-east-1"),
            (("myBucket", None, "us-west-1", "eu-west-1"), "eu-west-1"),
            ((None, "us-east-1", "us-west-1", "eu-west-1"), "us-west-1"),
            ((None, "us-east-1", None, "eu-west-1"), "eu-west-1"),
        )

        for args, result in tests:
            self.assertEqual(select_bucket_region(*args), result)
Exemplo n.º 2
0
    def test_select_bucket_region(self):
        tests = (
            (("myBucket", "us-east-1", "us-west-1", "eu-west-1"), "us-east-1"),
            (("myBucket", None, "us-west-1", "eu-west-1"), "eu-west-1"),
            ((None, "us-east-1", "us-west-1", "eu-west-1"), "us-west-1"),
            ((None, "us-east-1", None, "eu-west-1"), "eu-west-1"),

        )

        for args, result in tests:
            self.assertEqual(select_bucket_region(*args), result)
Exemplo n.º 3
0
def test_select_bucket_region(case):
    result = case.pop('result')
    assert select_bucket_region(**case) == result