Fixes endpoint_filter tests

The tests were written incorrectly and only worked because SQLite
doesn't enforce foreign key relationships by default.

implements bp tests-on-rdbmses
Change-Id: I8f4b64485ecdc6088c816f7f675cc5cefc83f9ac
Merge "Fixes endpoint_filter tests"