def test_bottle(): """ Tests the data structure Bucket """ print "Testing the Bottle Structure." print "Testing initialization:" kgraph = CD.karate_club_graph() b = CD.Bottle('sally', kgraph, [1, 2, 3, 4]) check_bottle(b, 'sally', 12, 29, 4, 12) print "Testing add node:" b.add_member(kgraph, 31) check_bottle(b, 'sally', 14, 31, 5, 20) print "Testing remove node:" b.remove_member(kgraph, 31) check_bottle(b, 'sally', 12, 29, 4, 12)