Fix bugs in sidepots, change tests to unittest