File tree Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Original file line number Diff line number Diff line change
1
+ import logging
1
2
from test .unit .base import ClientBaseCase
2
3
3
4
from linode_api4 import PostgreSQLDatabase
@@ -106,19 +107,18 @@ def test_create(self):
106
107
Test that MySQL databases can be created
107
108
"""
108
109
110
+ logger = logging .getLogger (__name__ )
111
+
109
112
with self .mock_post ("/databases/mysql/instances" ) as m :
110
113
# We don't care about errors here; we just want to
111
114
# validate the request.
112
- try :
113
- self .client .database .mysql_create (
114
- "cool" ,
115
- "us-southeast" ,
116
- "mysql/8.0.26" ,
117
- "g6-standard-1" ,
118
- cluster_size = 3 ,
119
- )
120
- except Exception :
121
- pass
115
+ self .client .database .mysql_create (
116
+ "cool" ,
117
+ "us-southeast" ,
118
+ "mysql/8.0.26" ,
119
+ "g6-standard-1" ,
120
+ cluster_size = 3 ,
121
+ )
122
122
123
123
self .assertEqual (m .method , "post" )
124
124
self .assertEqual (m .call_url , "/databases/mysql/instances" )
@@ -292,16 +292,13 @@ def test_create(self):
292
292
with self .mock_post ("/databases/postgresql/instances" ) as m :
293
293
# We don't care about errors here; we just want to
294
294
# validate the request.
295
- try :
296
- self .client .database .postgresql_create (
297
- "cool" ,
298
- "us-southeast" ,
299
- "postgresql/13.2" ,
300
- "g6-standard-1" ,
301
- cluster_size = 3 ,
302
- )
303
- except Exception :
304
- pass
295
+ self .client .database .mysql_create (
296
+ "cool" ,
297
+ "us-southeast" ,
298
+ "mysql/8.0.26" ,
299
+ "g6-standard-1" ,
300
+ cluster_size = 3 ,
301
+ )
305
302
306
303
self .assertEqual (m .method , "post" )
307
304
self .assertEqual (m .call_url , "/databases/postgresql/instances" )
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ def test_list_ips(self):
138
138
139
139
ip = result [0 ]
140
140
assert ip .address == "10.0.0.2"
141
- assert ip .address_range == None
141
+ assert ip .address_range is None
142
142
assert ip .vpc_id == 123
143
143
assert ip .subnet_id == 456
144
144
assert ip .region == "us-mia"
You can’t perform that action at this time.
0 commit comments