Call get_missing_files
This commit is contained in:
parent
07cd251aaa
commit
853d2ecf69
|
@ -66,8 +66,8 @@ def main(email, password, directory):
|
||||||
login_with_password(browser, email, password)
|
login_with_password(browser, email, password)
|
||||||
click_go_to_your_garden(browser)
|
click_go_to_your_garden(browser)
|
||||||
garden_filenames = get_garden_filenames(browser)
|
garden_filenames = get_garden_filenames(browser)
|
||||||
get_local_filenames(directory)
|
local_filenames = get_local_filenames(directory)
|
||||||
# Get list of files in target upload directory that don't exist in File Garden (test based on filename? size? file contents?)
|
get_missing_filenames(local_filenames, garden_filenames)
|
||||||
# For each file in the second list, go through the file upload process
|
# For each file in the second list, go through the file upload process
|
||||||
#browser.close()
|
#browser.close()
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,9 @@ class TestJardin(unittest.TestCase):
|
||||||
@patch("jardin.click_go_to_your_garden")
|
@patch("jardin.click_go_to_your_garden")
|
||||||
@patch("jardin.get_garden_filenames")
|
@patch("jardin.get_garden_filenames")
|
||||||
@patch("jardin.get_local_filenames")
|
@patch("jardin.get_local_filenames")
|
||||||
|
@patch("jardin.get_missing_filenames")
|
||||||
def test_main_calls_methods_in_correct_order(self,
|
def test_main_calls_methods_in_correct_order(self,
|
||||||
|
mockGetMissingFilenames,
|
||||||
mockGetLocalFilenames,
|
mockGetLocalFilenames,
|
||||||
mockGetGardenFilenames,
|
mockGetGardenFilenames,
|
||||||
mockClickGoToYourGarden,
|
mockClickGoToYourGarden,
|
||||||
|
@ -158,6 +160,7 @@ class TestJardin(unittest.TestCase):
|
||||||
mockClickGoToYourGarden.assert_called_once_with(mockInitializeWebdriver.return_value)
|
mockClickGoToYourGarden.assert_called_once_with(mockInitializeWebdriver.return_value)
|
||||||
mockGetGardenFilenames.assert_called_once_with(mockInitializeWebdriver.return_value)
|
mockGetGardenFilenames.assert_called_once_with(mockInitializeWebdriver.return_value)
|
||||||
mockGetLocalFilenames.assert_called_once_with(mockDirectory)
|
mockGetLocalFilenames.assert_called_once_with(mockDirectory)
|
||||||
|
mockGetMissingFilenames.assert_called_once_with(mockGetLocalFilenames.return_value, mockGetGardenFilenames.return_value)
|
||||||
|
|
||||||
#mockInitializeWebdriver.return_value.close.assert_called_once()
|
#mockInitializeWebdriver.return_value.close.assert_called_once()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue