If you try stepping through this with a debugger, you'll see that sqlite3.Error is not the only exception that is raised when bad data is posted with the form.  For example, if you post a "text" field that is set to None, you get back a BadRequestKeyError, which is a subclass of KeyError.  That's because in schema.sql you have "text string not null".  So you can use this to build an additional test case that posts a None field, and then instead of checking actual.data, you check actual.status_code.  But you also want to add an "except KeyError" in your add_entry().