def test__path_to_relative_url_win(self, join_mock, split_mock): """ Tests _path_to_relative_url on Windows system """ input_ = [r'C:\foo\bar\baz.css', r'C:\foo\bar.css', r'\foo\bar.css'] expected = ['/foo/bar/baz.css', '/foo/bar.css', '/foo/bar.css'] for in_, exp in zip(input_, expected): actual = flask_s3._path_to_relative_url(in_) self.assertEquals(exp, actual)
def test__path_to_relative_url_win(self, join_mock, split_mock): """ Tests _path_to_relative_url on Windows system """ input_ = [r"C:\foo\bar\baz.css", r"C:\foo\bar.css", r"\foo\bar.css"] expected = ["/foo/bar/baz.css", "/foo/bar.css", "/foo/bar.css"] for in_, exp in zip(input_, expected): actual = flask_s3._path_to_relative_url(in_) self.assertEquals(exp, actual)