def test_guess_fallback(): mimetype, _ = guess('ha', 'text/plain') assert mimetype == 'text/plain'
def test_guess_recognised(): mimetype, _ = guess('file.html') assert mimetype == 'text/html'
def test_guess_recognised(): mimetype, _ = guess('file.html', 'text/plain') assert mimetype == 'text/html'
def test_guess_fallback(): mimetype, _ = guess('ha', fallback='text/plain') assert mimetype == 'text/plain'