def test_replace_all():
    # Test replace_all for case insensitivity
    assert replace_all('tyr') == 'Y'
    assert replace_all('tYr') == 'Y'
    assert replace_all('Tyr') == 'Y'
    assert replace_all('tyR') == 'Y'
    assert replace_all('TyR') == 'Y'
    assert replace_all('TYR') == 'Y'
    assert replace_all('tYR') == 'Y'
    assert replace_all('sEr') == 'S'

    # Test replace_all only targets the dict() keys
    assert replace_all('bubblegum juice cup dairy hot pot Tyr melon') == 'bubblegum juice cup dairy hot pot Y melon'
    assert replace_all('Ly Lys Pr Pro Gln Glad Ph PH Phe') == 'Ly K Pr P Q Glad Ph PH F'
    assert replace_all(
        'nOt can fat Tan Rat cat dog man Men FAn rot taR car fAr map TAP Zip poP') == 'nOt can fat Tan Rat cat dog man Men FAn rot taR car fAr map TAP Zip poP'

    # Test replace_all is not affected by numbers
    assert replace_all('Tyr600E Cys56734342342454562456') == 'Y600E C56734342342454562456'
    assert replace_all(
        '60 045 434 345 4 26 567 254 245 34 67567 8 56 8 364 56 6 345 7567 3455 6 8 99 89 7 3') == '60 045 434 345 4 26 567 254 245 34 67567 8 56 8 364 56 6 345 7567 3455 6 8 99 89 7 3'

    # Test replace_all is not affected by empty string and whitespaces
    assert replace_all('') == ''
    assert replace_all(' ') == ' '
    assert replace_all('Tyr Asn As n Ile Il e') == 'Y N As n I Il e'