Stop using your black friend as your excuse and justification for not being racist. It's like using your female friend or sister as an excuse to not be labeled as a misogynist. You can still have a female friend and be a misogynist, just like you can still have an African American friend and be racist.
I know confronting the fact that you may actually be racist is disorienting when you likely have not even confronted it.
Here is the thing. All white people are racist. Every single white person in America is racist. As Emory University professor George Yancy put in his New York Times address, "You may have never used the N-word in your life, you may hate the K.K.K., but that does not mean that you don’t harbor racism and benefit from racism."
You don't have to promote racism and may never have said a racial slur in your life but you are racist, and claiming your black friends does not make you less racist. White people can walk into stores without being followed. White people don't have to talk to their children about what to do when confronted with a white police officer. White people can be terrorists and not be labeled as one - instead, white people are 'mentally disabled' or 'mentally disturbed.' It's amazing the benefits white people, like myself, can reap from this system.
Let me clarify what I mean by saying that all white people are racist. This doesn't mean that white people intentionally hate black people or desire to oppress them, although there are some who do. It means that despite our best intentions, we perpetuate racism every day. We don't speak out every time we should.
The system America was built on was built for white people. As white people reap the benefits of, black people and people of color suffer from it. No matter how hard we, white people, work to not be racist, we will always be. Part of racism is systematic and I will always benefit from the system, even when I can't recognize it.
So when you use your African American friend or significant other or co-worker as an excuse for not being racist, you are avoiding the subject altogether. Instead, take this time to understand that until the system is completely changed to include and benefit everyone, white people will always be racist, no matter their intentions. The first step towards changing the system is accepting this.