Last active
September 9, 2019 18:41
-
-
Save serenamm/fad8b9d7221d8c39fd095f8b8e48dcc5 to your computer and use it in GitHub Desktop.
This file contains 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 test_make_query_true(mocker): | |
# Create some fake table paths | |
test_paths = { | |
"product_table": { | |
"table": "products", | |
}, | |
"similarity_table": { | |
"table": "product_similarity" | |
} | |
} | |
# Call the function with our paths and "True" | |
same_category_q = make_query(True, test_paths) | |
# We want same_category_q to be non-empty | |
assert same_category_q != '' | |
def test_make_query_false(mocker): | |
# As above, create some fake paths | |
test_paths = { | |
"product_table": { | |
"table": "products", | |
}, | |
"similarity_table": { | |
"table": "product_similarity" | |
} | |
} | |
same_category_q = make_query(False, test_paths) | |
# This time, we want same_category_q to be empty | |
assert same_category_q == '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment