Town will host Bristol City at Huish Park in a pre-season friendly on Saturday 16th July.
Lee Johnson will bring his Championship side to Somerset for the 3pm kick-off ahead of the start of the 2016/17 EFL season.
Manager Darren Way said: "It is always nice to play a local team who bring a good support to add to our fantastic support.
"After playing alongside Lee for years, it will be great to be up against each other as managers.
"In training we were ultra-competitive against each other and I’m sure this fixture will be no different."