def test_select_bucket_region(self): """Test select bucket region.""" 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)
def test_select_bucket_region(self) -> None: """Test select bucket region.""" tests: Tuple[Tuple[Tuple[Optional[str], Optional[str], Optional[str], str], str], ...] = ( (("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) # type: ignore