Skip to content

Commit e7d59df

Browse files
committed
test cases updated and ruk param added
1 parent 4ecef9a commit e7d59df

28 files changed

+919
-913
lines changed

jelastic/api/data/__init__.py

Lines changed: 54 additions & 54 deletions
Large diffs are not rendered by default.

jelastic/api/environment/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6987,7 +6987,7 @@ def GetEnvActions(
69876987
)
69886988

69896989
def GetServerUTCTime(self, ruk: str = None):
6990-
return self._get("GetServerUTCTime", params={})
6990+
return self._get("GetServerUTCTime", params={"ruk": ruk})
69916991

69926992
def GetUidActions(
69936993
self,

tests/unit/test_api/test_billing/test_system.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ def test_clean_check_request_cache(client):
55
client._get.return_value = success_response
66
response = client.System.CleanCheckRequestCache(
77
1,
8-
True,
8+
True,"ruk",
99
)
1010
client._get.assert_called_with(
1111
"CleanCheckRequestCache",
1212
params={
1313
"uid": 1,
14-
"localOnly": True,
14+
"localOnly": True,"ruk": "ruk",
1515
},
1616
)
1717
assert response == success_response
@@ -22,14 +22,14 @@ def test_event_Sys(client):
2222
response = client.System.Event(
2323
"topic",
2424
"message",
25-
True,
25+
True,"ruk",
2626
)
2727
client._get.assert_called_with(
2828
"Event",
2929
params={
3030
"topic": "topic",
3131
"message": "message",
32-
"publishLocal": True,
32+
"publishLocal": True,"ruk": "ruk",
3333
},
3434
)
3535
assert response == success_response
@@ -39,80 +39,80 @@ def test_get_api_description(client):
3939
client._get.return_value = success_response
4040
response = client.System.GetAPIDescriptions(
4141
False,
42-
True,
42+
True,"ruk",
4343
)
4444
client._get.assert_called_with(
4545
"GetAPIDescriptions",
4646
params={
4747
"isPublicOnly": False,
48-
"isToken": True,
48+
"isToken": True,"ruk": "ruk",
4949
},
5050
)
5151
assert response == success_response
5252

5353

5454
def test_get_auto_percent(client):
5555
client._get.return_value = success_response
56-
response = client.System.GetAutoPercent()
57-
client._get.assert_called_with("GetAutoPercent", params={})
56+
response = client.System.GetAutoPercent("ruk",)
57+
client._get.assert_called_with("GetAutoPercent", params={"ruk": "ruk",})
5858
assert response == success_response
5959

6060

6161
def test_get_cache_stats(client):
6262
client._get.return_value = success_response
63-
response = client.System.GetCacheStats()
64-
client._get.assert_called_with("GetCacheStats", params={})
63+
response = client.System.GetCacheStats("ruk",)
64+
client._get.assert_called_with("GetCacheStats", params={"ruk": "ruk",})
6565
assert response == success_response
6666

6767

6868
def test_get_cache_status(client):
6969
client._get.return_value = success_response
70-
response = client.System.GetCacheStatus()
71-
client._get.assert_called_with("GetCacheStatus", params={})
70+
response = client.System.GetCacheStatus("ruk",)
71+
client._get.assert_called_with("GetCacheStatus", params={"ruk": "ruk",})
7272
assert response == success_response
7373

7474

7575
def test_get_instance_cache_status(client):
7676
client._get.return_value = success_response
77-
response = client.System.GetInstanceCacheStatus()
78-
client._get.assert_called_with("GetInstanceCacheStatus", params={})
77+
response = client.System.GetInstanceCacheStatus("ruk",)
78+
client._get.assert_called_with("GetInstanceCacheStatus", params={"ruk": "ruk",})
7979
assert response == success_response
8080

8181

8282
def test_get_status(client):
8383
client._get.return_value = success_response
84-
response = client.System.GetStatus("checksum")
85-
client._get.assert_called_with("GetStatus", params={"checksum": "checksum"})
84+
response = client.System.GetStatus("checksum","ruk",)
85+
client._get.assert_called_with("GetStatus", params={"checksum": "checksum","ruk": "ruk",})
8686
assert response == success_response
8787

8888

8989
def test_get_version(client):
9090
client._get.return_value = success_response
91-
response = client.System.GetVersion()
92-
client._get.assert_called_with("GetVersion", params={})
91+
response = client.System.GetVersion("ruk",)
92+
client._get.assert_called_with("GetVersion", params={"ruk": "ruk",})
9393
assert response == success_response
9494

9595

9696
def test_refresh_email_templates(client):
9797
client._get.return_value = success_response
98-
response = client.System.RefreshEmailTemplates()
99-
client._get.assert_called_with("RefreshEmailTemplates", params={})
98+
response = client.System.RefreshEmailTemplates("ruk",)
99+
client._get.assert_called_with("RefreshEmailTemplates", params={"ruk": "ruk",})
100100
assert response == success_response
101101

102102

103103
def test_refresh_user(client):
104104
client._get.return_value = success_response
105-
response = client.System.RefreshUser("language")
106-
client._get.assert_called_with("RefreshUser", params={"language": "language"})
105+
response = client.System.RefreshUser("language","ruk",)
106+
client._get.assert_called_with("RefreshUser", params={"language": "language","ruk": "ruk",})
107107
assert response == success_response
108108

109109

110110
def test_reload_configuration(client):
111111
client._get.return_value = success_response
112-
response = client.System.ReloadConfiguration(1, "place holder")
112+
response = client.System.ReloadConfiguration(1, "place holder","ruk",)
113113
client._get.assert_called_with(
114114
"ReloadConfiguration",
115-
params={"resellerId": 1, "changedPlaceholders": "place holder"},
115+
params={"resellerId": 1, "changedPlaceholders": "place holder","ruk": "ruk",},
116116
)
117117
assert response == success_response
118118

@@ -123,29 +123,29 @@ def test_send_email(client):
123123
"template",
124124
125125
"language",
126-
1,
126+
1,"ruk",
127127
)
128128
client._get.assert_called_with(
129129
"SendEmail",
130130
params={
131131
"template": "template",
132132
"email": "[email protected]",
133133
"language": "language",
134-
"timeout": 1,
134+
"timeout": 1,"ruk": "ruk",
135135
},
136136
)
137137
assert response == success_response
138138

139139

140140
def test_validate(client):
141141
client._get.return_value = success_response
142-
response = client.System.Validate()
143-
client._get.assert_called_with("Validate", params={})
142+
response = client.System.Validate("ruk",)
143+
client._get.assert_called_with("Validate", params={"ruk": "ruk",})
144144
assert response == success_response
145145

146146

147147
def test_validate_all(client):
148148
client._get.return_value = success_response
149-
response = client.System.ValidateAll()
150-
client._get.assert_called_with("ValidateAll", params={})
149+
response = client.System.ValidateAll("ruk",)
150+
client._get.assert_called_with("ValidateAll", params={"ruk": "ruk",})
151151
assert response == success_response

tests/unit/test_api/test_billing/test_utils.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_clear_billing_history(client):
88
1,
99
CURRENT_DATETIME.date(),
1010
CURRENT_DATETIME.date(),
11-
"checksum",
11+
"checksum","ruk",
1212
)
1313
client._get.assert_called_with(
1414
"ClearBillingHistory",
@@ -17,7 +17,7 @@ def test_clear_billing_history(client):
1717
"uid": 1,
1818
"startDate": CURRENT_DATETIME.date(),
1919
"endDate": CURRENT_DATETIME.date(),
20-
"checksum": "checksum",
20+
"checksum": "checksum","ruk": "ruk",
2121
},
2222
datetime_format="%Y-%m-%d %H:%M:%S",
2323
)
@@ -29,14 +29,14 @@ def test_clear_month_traffic(client):
2929
response = client.Utils.ClearMonthTraffic(
3030
1,
3131
"2022-11-11",
32-
"checksum",
32+
"checksum","ruk",
3333
)
3434
client._get.assert_called_with(
3535
"ClearMonthTraffic",
3636
params={
3737
"uid": 1,
3838
"monthStart": "2022-11-11",
39-
"checksum": "checksum",
39+
"checksum": "checksum","ruk": "ruk",
4040
},
4141
)
4242
assert response == success_response
@@ -48,15 +48,15 @@ def test_get_uid_usage_by_period(client):
4848
1,
4949
CURRENT_DATETIME.date(),
5050
CURRENT_DATETIME.date(),
51-
"checksum",
51+
"checksum","ruk",
5252
)
5353
client._get.assert_called_with(
5454
"GetUidUsageByPeriod",
5555
params={
5656
"uid": 1,
5757
"startDate": CURRENT_DATETIME.date(),
5858
"endDate": CURRENT_DATETIME.date(),
59-
"checksum": "checksum",
59+
"checksum": "checksum","ruk": "ruk",
6060
},
6161
datetime_format="%Y-%m-%d %H:%M:%S",
6262
)
@@ -69,15 +69,15 @@ def test_set_account_date(client):
6969
1,
7070
"type",
7171
"value",
72-
"checksum",
72+
"checksum","ruk",
7373
)
7474
client._get.assert_called_with(
7575
"SetAccountDate",
7676
params={
7777
"uid": 1,
7878
"dateType": "type",
7979
"dateValue": "value",
80-
"checksum": "checksum",
80+
"checksum": "checksum","ruk": "ruk",
8181
},
8282
)
8383
assert response == success_response
@@ -92,7 +92,7 @@ def test_set_billing_history_date(client):
9292
CURRENT_DATETIME.date(),
9393
"date type",
9494
"value",
95-
"checksum",
95+
"checksum","ruk",
9696
)
9797
client._get.assert_called_with(
9898
"SetBillingHistoryDate",
@@ -103,7 +103,7 @@ def test_set_billing_history_date(client):
103103
"startDateTo": CURRENT_DATETIME.date(),
104104
"dateType": "date type",
105105
"dateValue": "value",
106-
"checksum": "checksum",
106+
"checksum": "checksum","ruk": "ruk",
107107
},
108108
datetime_format="%Y-%m-%d",
109109
)
@@ -116,15 +116,15 @@ def test_set_month_traffic(client):
116116
1,
117117
"2022-11-11",
118118
3,
119-
"checksum",
119+
"checksum","ruk",
120120
)
121121
client._get.assert_called_with(
122122
"SetMonthTraffic",
123123
params={
124124
"uid": 1,
125125
"monthStart": "2022-11-11",
126126
"externalTraffic": 3,
127-
"checksum": "checksum",
127+
"checksum": "checksum","ruk": "ruk",
128128
},
129129
)
130130
assert response == success_response

0 commit comments

Comments
 (0)