MagicFeedback 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MagicFeedback
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: SDK for MagicFeedback API
5
5
  Author-email: Francisco Arias <farias@magicfedback.io>
6
6
  Project-URL: Homepage, https://github.com/MagicFeedback/magicfeedback_python_sdk
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "MagicFeedback"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  authors = [
5
5
  { name="Francisco Arias", email="farias@magicfedback.io" },
6
6
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MagicFeedback
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: SDK for MagicFeedback API
5
5
  Author-email: Francisco Arias <farias@magicfedback.io>
6
6
  Project-URL: Homepage, https://github.com/MagicFeedback/magicfeedback_python_sdk
@@ -65,9 +65,12 @@ class MagicFeedbackClient:
65
65
  response.raise_for_status() # Raise exception for non-2xx status codes
66
66
  # TODO: Control the status of the call
67
67
  print("Status code: ", response.status_code)
68
- print("Response: ", response.json())
69
-
70
- return response.json()
68
+ # Control if exist response that can be converted in json
69
+ if response.text:
70
+ print("Response: ", response.json())
71
+ return response.json()
72
+
73
+ return {}
71
74
 
72
75
  ####################################################################################
73
76
  # Feedback API Methods #
@@ -5,7 +5,7 @@ import pytest
5
5
 
6
6
  from src.magicfeedback import MagicFeedbackClient
7
7
 
8
- '''
8
+
9
9
  def test_create_campaign(client):
10
10
  """Tests creating a new campaign item."""
11
11
 
@@ -34,7 +34,6 @@ def test_list_campaign(client):
34
34
 
35
35
  response = client.get_campaigns(filter)
36
36
  assert len(response) > 0
37
- '''
38
37
 
39
38
  def test_create_campaign_session(client):
40
39
  """Tests creating a new campaign session item."""
@@ -29,6 +29,8 @@ def test_create_contact(client):
29
29
  assert response["lastname"] == last_name
30
30
  assert response["email"] == email
31
31
 
32
+ response = client.update_contact(response["id"], {"name": "Updated Name"})
33
+
32
34
  def test_list_contact(client):
33
35
  """Tests listing contact items."""
34
36
 
File without changes
File without changes
File without changes