Last active
August 29, 2015 14:12
-
-
Save bamthomas/b9213bd712d85aa4f3f6 to your computer and use it in GitHub Desktop.
Bad assert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def assert_dict_is_in_csv(exported_file_content, expected_line_dict): | |
lines = exported_file_content.rstrip('\r\n').split('\r\n') | |
for line in lines: | |
if all(['%s' % value in line for value in expected_line_dict.values()]): | |
return | |
raise AssertionError('%s not in file [%s]' % (expected_line_dict, lines)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment