This is the core functionality of beproductive. A defined list of websites is added to the `hosts` file of the OS with a redirect to `127.0.0.1`.
import filecmp
blocker = Blocker()
blocker.blocklist
assert filecmp.cmp(host_fp, host_fp_copy) == True, "hosts file should be identical to hosts.original"
blocker.block()
assert filecmp.cmp(host_fp, host_fp_blocked) == True, "hosts file should be identical to hosts.blocked"
blocker.unblock()
assert filecmp.cmp(host_fp, host_fp_copy) == True, "hosts file should be identical to hosts.original"