feluelle commented on a change in pull request #15609:
URL: https://github.com/apache/airflow/pull/15609#discussion_r632351089
##########
File path: tests/providers/amazon/aws/hooks/test_s3.py
##########
@@ -69,6 +69,11 @@ def test_parse_s3_url(self):
parsed = S3Hook.parse_s3_url("s3://test/this/is/not/a-real-key.txt")
assert parsed == ("test", "this/is/not/a-real-key.txt"), "Incorrect
parsing of the s3 url"
+ def test_parse_s3_object_directory(self):
+ parsed =
S3Hook.parse_s3_url("s3://test/this/is/not/a-real-s3-directory/")
+ assert parsed != ("test", "this/is/not/a-real-s3-directory"),
"Incorrect parsing of the s3 url"
+ assert parsed == ("test", "this/is/not/a-real-s3-directory/"),
"Incorrect parsing of the s3 url"
Review comment:
```suggestion
parsed =
S3Hook.parse_s3_url("s3://test/this/is/not/a-real-s3-directory/")
assert parsed == ("test", "this/is/not/a-real-s3-directory/"),
"Incorrect parsing of the s3 url"
```
This is sufficient :) If the `==` fails, the other one will succeed
automatically.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]