Repository: dwavesystems/dimod

Issue:
Response futures appear to be strings?
```
from dwave.system.samplers import DWaveSampler

sampler = DWaveSampler(profile='BAY4')

h = {}
J = {(0, 4): -1}

response = sampler.sample_ising(h, J, num_reads=10)
print response.done()
```
yields
```
AttributeError: 'str' object has no attribute 'done'
```
If I print `response._futures` right after creating the response, I get 
```
{'ignore_extra_keys': True, 'samples_key': 'samples', 'futures': (<dwave.cloud.computation.Future object at 0x7f31793d8110>,), 'data_vector_keys': {'energies': 'energy', 'num_occurrences': 'num_occurrences'}, 'active_variables': [0, 4], 'variable_labels': [0, 4], 'info_keys': {'timing': 'timing'}}
```
Is it possible `response._futures` is temporarily overwritten somewhere? Apparently yes, `response._futures` can hold something else than futures: at https://github.com/dwavesystems/dimod/blob/master/dimod/response.py#L561, it gets populated with a bunch of stuff, including non-futures.

So `response._futures` can be different things at different stages of the response ... :-1: 

Discussion:

Patch:
diff --git a/dimod/response.py b/dimod/response.py
index 1378ed70..e2b30309 100644
--- a/dimod/response.py
+++ b/dimod/response.py
@@ -230,7 +230,7 @@ class Response(Iterable, Sized):
             True
 
         """
-        return all(future.done() for future in self._futures)
+        return all(future.done() for future in self._futures.get('futures', tuple()))
 
     ##############################################################################################
     # Construction and updates
@@ -559,7 +559,7 @@ class Response(Iterable, Sized):
         response = cls.empty(vartype)
 
         # now dump all of the remaining information into the _futures
-        response._futures = {'futures': futures,
+        response._futures = {'futures': list(futures),
                              'samples_key': samples_key,
                              'data_vector_keys': data_vector_keys,
                              'info_keys': info_keys,


Test patch:
diff --git a/tests/test_response.py b/tests/test_response.py
index bd18948e..c3c0ddf3 100644
--- a/tests/test_response.py
+++ b/tests/test_response.py
@@ -301,6 +301,8 @@ class TestResponse(unittest.TestCase):
 
         response = dimod.Response.from_futures(_futures(), vartype=dimod.SPIN, num_variables=3)
 
+        self.assertTrue(response.done())
+
         matrix = response.samples_matrix
 
         npt.assert_equal(matrix, np.matrix([[-1, -1, 1], [-1, -1, 1]]))