Update dfs.py
Adds tests for dfs