Skip to content

Commit

Permalink
Refs #4 - Backend: test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-fvh committed Jan 13, 2020
1 parent 342dfcb commit 0f68ff8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/core/tests/test_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_subscribe(self):
# And the subscription is submitted to the external service
([url], kwargs) = self.mock_requests.last_request
self.assertEqual(url, self.service.subscribe_url)
self.assert_dict_contains(kwargs['data'], {
self.assert_dict_contains(kwargs['json'], {
'uuid': str(subscription.uuid),
'attributes': [{
'id': self.temperature.id,
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_subscribe_with_history(self):
# And the existing measurements are submitted to the external service
([url], kwargs) = self.mock_requests.last_request
self.assertEqual(url, self.service.data_url)
self.assert_dict_contains(kwargs['data'], {
self.assert_dict_contains(kwargs['json'], {
'uuid': str(subscription.uuid),
'values': [{
'attribute': apsen_attr.id,
Expand Down Expand Up @@ -139,7 +139,7 @@ def test_subscription_receives_data(self):
# And the data is submitted to the external service
([url], kwargs) = self.mock_requests.last_request
self.assertEqual(url, self.service.data_url)
self.assert_dict_contains(kwargs['data'], {
self.assert_dict_contains(kwargs['json'], {
'uuid': str(subscription.uuid),
'values': [{
'attribute': apsen_attr.id,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/containers/Subscriptions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class SubscriptionsPage extends Component {
title: 'Could not subscribe to service',
subtitle: `${e.message}`
});
throw e;
}
};

Expand Down

0 comments on commit 0f68ff8

Please sign in to comment.