Motif-based tests for bipartite networks