Repository: Duke-GCB/DukeDSClient

Issue:
AttributeError: 'UploadContext' object has no attribute 'start_waiting'
In refactoring the name of the method I missed one case.
UploadContext method should be `start_waiting` (ddsc/core/projectuploader.py).

Discussion:

Patch:
diff --git a/ddsc/core/projectuploader.py b/ddsc/core/projectuploader.py
index 926df55..7498835 100644
--- a/ddsc/core/projectuploader.py
+++ b/ddsc/core/projectuploader.py
@@ -78,7 +78,7 @@ class UploadContext(object):
         """
         self.message_queue.put((self.task_id, data))
 
-    def started_waiting(self):
+    def start_waiting(self):
         """
         Called when we start waiting for project to be ready for file uploads.
         """
@@ -86,7 +86,7 @@ class UploadContext(object):
 
     def done_waiting(self):
         """
-        Called when project isready for file uploads (after waiting).
+        Called when project is ready for file uploads (after waiting).
         """
         self.send_message(False)
 
diff --git a/devRequirements.txt b/devRequirements.txt
index 4b55c18..5fade57 100644
--- a/devRequirements.txt
+++ b/devRequirements.txt
@@ -1,2 +1,3 @@
 mock==2.0.0
 flake8==3.3.0
+nose==1.3.7


Test patch:
diff --git a/ddsc/core/tests/test_projectuploader.py b/ddsc/core/tests/test_projectuploader.py
index 54b333a..8fc0f00 100644
--- a/ddsc/core/tests/test_projectuploader.py
+++ b/ddsc/core/tests/test_projectuploader.py
@@ -24,6 +24,24 @@ class TestUploadContext(TestCase):
         context = UploadContext(settings, params, multiprocessing.Manager().Queue(), 12)
         pickle.dumps(context)
 
+    def test_start_waiting(self):
+        mock_message_queue = MagicMock()
+        context = UploadContext(settings=MagicMock(),
+                                params=[],
+                                message_queue=mock_message_queue,
+                                task_id=12)
+        context.start_waiting()
+        mock_message_queue.put.assert_called_with((12, True))
+
+    def test_done_waiting(self):
+        mock_message_queue = MagicMock()
+        context = UploadContext(settings=MagicMock(),
+                                params=[],
+                                message_queue=mock_message_queue,
+                                task_id=13)
+        context.done_waiting()
+        mock_message_queue.put.assert_called_with((13, False))
+
 
 class TestProjectUploadDryRun(TestCase):
     def test_single_empty_non_existant_directory(self):