#NEWLINE# def test_entity( db_conn , cards_table , follows_table ) : #NEWLINE# #INDENT# '\n    Expect a follow to require an entity kind and id.\n    ' #NEWLINE# create_card_a ( db_conn , cards_table ) #NEWLINE# ( follow , errors ) = Follow . insert ( db_conn , { #NEWLINE# #INDENT# 'user_id' : 'A' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( len ( errors ) == 2 ) #NEWLINE# follow [ 'entity' ] = { #NEWLINE# #INDENT# 'id' : 'A' , #NEWLINE# 'kind' : 'card' , #NEWLINE# #UNINDENT# } #NEWLINE# ( follow , errors ) = follow . save ( db_conn ) #NEWLINE# assert ( len ( errors ) == 0 )