add flask test code