Skip to content

Commit fd8414b

Browse files
committed
chore: disable api field notess and history tests
tests being re-written ref: #788 #759 #768
1 parent 0b25676 commit fd8414b

7 files changed

Lines changed: 120 additions & 120 deletions

File tree

app/access/tests/unit/role/test_unit_role_api_v2.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,31 +98,31 @@ def setUpTestData(self):
9898

9999

100100

101-
def test_api_field_exists_url_history(self):
102-
""" Test for existance of API Field
101+
# def test_api_field_exists_url_history(self):
102+
# """ Test for existance of API Field
103103

104-
_urls.history field must exist
105-
"""
104+
# _urls.history field must exist
105+
# """
106106

107-
assert 'history' in self.api_data['_urls']
107+
# assert 'history' in self.api_data['_urls']
108108

109109

110-
def test_api_field_type_url_history(self):
111-
""" Test for type for API Field
110+
# def test_api_field_type_url_history(self):
111+
# """ Test for type for API Field
112112

113-
_urls.history field must be str
114-
"""
113+
# _urls.history field must be str
114+
# """
115115

116-
assert type(self.api_data['_urls']['history']) is str
116+
# assert type(self.api_data['_urls']['history']) is str
117117

118118

119-
def test_api_field_type_url_history_value(self):
120-
""" Test for url value
119+
# def test_api_field_type_url_history_value(self):
120+
# """ Test for url value
121121

122-
_urls.history field must use the endpoint for entity model
123-
"""
122+
# _urls.history field must use the endpoint for entity model
123+
# """
124124

125-
assert str(self.api_data['_urls']['history']).endswith('/access/role/' + str(self.item.pk) + '/history')
125+
# assert str(self.api_data['_urls']['history']).endswith('/access/role/' + str(self.item.pk) + '/history')
126126

127127

128128

app/api/tests/abstract/api_fields.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -96,56 +96,56 @@ def test_api_field_type_urls_self(self):
9696

9797

9898

99-
def test_api_field_exists_urls_notes(self):
100-
""" Test for existance of API Field
99+
# def test_api_field_exists_urls_notes(self):
100+
# """ Test for existance of API Field
101101

102-
_urls.notes field must exist
103-
"""
102+
# _urls.notes field must exist
103+
# """
104104

105-
obj = getattr(self.item, 'get_url_kwargs_notes', None)
105+
# obj = getattr(self.item, 'get_url_kwargs_notes', None)
106106

107-
if callable(obj):
107+
# if callable(obj):
108108

109-
obj = obj()
109+
# obj = obj()
110110

111-
if(
112-
not str(self.model._meta.model_name).lower().endswith('notes')
113-
and obj is not FeatureNotUsed
114-
):
111+
# if(
112+
# not str(self.model._meta.model_name).lower().endswith('notes')
113+
# and obj is not FeatureNotUsed
114+
# ):
115115

116-
assert 'notes' in self.api_data['_urls']
116+
# assert 'notes' in self.api_data['_urls']
117117

118-
else:
118+
# else:
119119

120-
print('Test is n/a')
120+
# print('Test is n/a')
121121

122-
assert True
122+
# assert True
123123

124124

125-
def test_api_field_type_urls_notes(self):
126-
""" Test for type for API Field
125+
# def test_api_field_type_urls_notes(self):
126+
# """ Test for type for API Field
127127

128-
_urls._self field must be str
129-
"""
128+
# _urls._self field must be str
129+
# """
130130

131-
obj = getattr(self.item, 'get_url_kwargs_notes', None)
131+
# obj = getattr(self.item, 'get_url_kwargs_notes', None)
132132

133-
if callable(obj):
133+
# if callable(obj):
134134

135-
obj = obj()
135+
# obj = obj()
136136

137-
if(
138-
not str(self.model._meta.model_name).lower().endswith('notes')
139-
and obj is not FeatureNotUsed
140-
):
137+
# if(
138+
# not str(self.model._meta.model_name).lower().endswith('notes')
139+
# and obj is not FeatureNotUsed
140+
# ):
141141

142-
assert type(self.api_data['_urls']['notes']) is str
142+
# assert type(self.api_data['_urls']['notes']) is str
143143

144-
else:
144+
# else:
145145

146-
print('Test is n/a')
146+
# print('Test is n/a')
147147

148-
assert True
148+
# assert True
149149

150150

151151

app/core/tests/unit/manufacturer/test_manufacturer_api_v2.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ def test_api_field_type_name(self):
9797

9898

9999

100-
def test_api_field_exists_url_history(self):
101-
""" Test for existance of API Field
100+
# def test_api_field_exists_url_history(self):
101+
# """ Test for existance of API Field
102102

103-
_urls.history field must exist
104-
"""
103+
# _urls.history field must exist
104+
# """
105105

106-
assert 'history' in self.api_data['_urls']
106+
# assert 'history' in self.api_data['_urls']
107107

108108

109-
def test_api_field_type_url_history(self):
110-
""" Test for type for API Field
109+
# def test_api_field_type_url_history(self):
110+
# """ Test for type for API Field
111111

112-
_urls.history field must be str
113-
"""
112+
# _urls.history field must be str
113+
# """
114114

115-
assert type(self.api_data['_urls']['history']) is str
115+
# assert type(self.api_data['_urls']['history']) is str

app/devops/tests/unit/feature_flag/test_unit_feature_flag_api_v2.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,22 @@ def test_api_field_type_name(self):
110110

111111

112112

113-
def test_api_field_exists_url_history(self):
114-
""" Test for existance of API Field
113+
# def test_api_field_exists_url_history(self):
114+
# """ Test for existance of API Field
115115

116-
_urls.history field must exist
117-
"""
116+
# _urls.history field must exist
117+
# """
118118

119-
assert 'history' in self.api_data['_urls']
119+
# assert 'history' in self.api_data['_urls']
120120

121121

122-
def test_api_field_type_url_history(self):
123-
""" Test for type for API Field
122+
# def test_api_field_type_url_history(self):
123+
# """ Test for type for API Field
124124

125-
_urls.history field must be str
126-
"""
125+
# _urls.history field must be str
126+
# """
127127

128-
assert type(self.api_data['_urls']['history']) is str
128+
# assert type(self.api_data['_urls']['history']) is str
129129

130130

131131
def test_api_field_exists_description(self):

app/devops/tests/unit/software_enable_feature_flag/test_unit_software_enable_feature_flag_api_v2.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,22 @@ def test_api_field_type_name(self):
108108

109109

110110

111-
def test_api_field_exists_url_history(self):
112-
""" Test for existance of API Field
111+
# def test_api_field_exists_url_history(self):
112+
# """ Test for existance of API Field
113113

114-
_urls.history field must exist
115-
"""
114+
# _urls.history field must exist
115+
# """
116116

117-
assert 'history' not in self.api_data['_urls']
117+
# assert 'history' not in self.api_data['_urls']
118118

119119

120-
def test_api_field_type_url_history(self):
121-
""" Test for type for API Field
120+
# def test_api_field_type_url_history(self):
121+
# """ Test for type for API Field
122122

123-
_urls.history field must be str
124-
"""
123+
# _urls.history field must be str
124+
# """
125125

126-
assert 'history' not in self.api_data['_urls']
126+
# assert 'history' not in self.api_data['_urls']
127127

128128

129129
def test_api_field_exists_description(self):

app/itam/tests/unit/device/test_device_api_v2.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -495,41 +495,41 @@ def test_api_field_type_urls_external_links(self):
495495

496496

497497

498-
def test_api_field_exists_urls_history(self):
499-
""" Test for existance of API Field
498+
# def test_api_field_exists_urls_history(self):
499+
# """ Test for existance of API Field
500500

501-
_urls.history field must exist
502-
"""
501+
# _urls.history field must exist
502+
# """
503503

504-
assert 'history' in self.api_data['_urls']
504+
# assert 'history' in self.api_data['_urls']
505505

506506

507-
def test_api_field_type_urls_history(self):
508-
""" Test for type for API Field
507+
# def test_api_field_type_urls_history(self):
508+
# """ Test for type for API Field
509509

510-
_urls.history field must be str
511-
"""
510+
# _urls.history field must be str
511+
# """
512512

513-
assert type(self.api_data['_urls']['history']) is str
513+
# assert type(self.api_data['_urls']['history']) is str
514514

515515

516516

517-
def test_api_field_exists_urls_notes(self):
518-
""" Test for existance of API Field
517+
# def test_api_field_exists_urls_notes(self):
518+
# """ Test for existance of API Field
519519

520-
_urls.notes field must exist
521-
"""
520+
# _urls.notes field must exist
521+
# """
522522

523-
assert 'notes' in self.api_data['_urls']
523+
# assert 'notes' in self.api_data['_urls']
524524

525525

526-
def test_api_field_type_urls_notes(self):
527-
""" Test for type for API Field
526+
# def test_api_field_type_urls_notes(self):
527+
# """ Test for type for API Field
528528

529-
_urls.notes field must be str
530-
"""
529+
# _urls.notes field must be str
530+
# """
531531

532-
assert type(self.api_data['_urls']['notes']) is str
532+
# assert type(self.api_data['_urls']['notes']) is str
533533

534534

535535

app/itam/tests/unit/software/test_software_api_v2.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -259,41 +259,41 @@ def test_api_field_type_urls_external_links(self):
259259

260260

261261

262-
def test_api_field_exists_urls_history(self):
263-
""" Test for existance of API Field
262+
# def test_api_field_exists_urls_history(self):
263+
# """ Test for existance of API Field
264264

265-
_urls.history field must exist
266-
"""
265+
# _urls.history field must exist
266+
# """
267267

268-
assert 'history' in self.api_data['_urls']
268+
# assert 'history' in self.api_data['_urls']
269269

270270

271-
def test_api_field_type_urls_history(self):
272-
""" Test for type for API Field
271+
# def test_api_field_type_urls_history(self):
272+
# """ Test for type for API Field
273273

274-
_urls.history field must be str
275-
"""
274+
# _urls.history field must be str
275+
# """
276276

277-
assert type(self.api_data['_urls']['history']) is str
277+
# assert type(self.api_data['_urls']['history']) is str
278278

279279

280280

281-
def test_api_field_exists_urls_notes(self):
282-
""" Test for existance of API Field
281+
# def test_api_field_exists_urls_notes(self):
282+
# """ Test for existance of API Field
283283

284-
_urls.notes field must exist
285-
"""
284+
# _urls.notes field must exist
285+
# """
286286

287-
assert 'notes' in self.api_data['_urls']
287+
# assert 'notes' in self.api_data['_urls']
288288

289289

290-
def test_api_field_type_urls_notes(self):
291-
""" Test for type for API Field
290+
# def test_api_field_type_urls_notes(self):
291+
# """ Test for type for API Field
292292

293-
_urls.notes field must be str
294-
"""
293+
# _urls.notes field must be str
294+
# """
295295

296-
assert type(self.api_data['_urls']['notes']) is str
296+
# assert type(self.api_data['_urls']['notes']) is str
297297

298298

299299

@@ -306,13 +306,13 @@ def test_api_field_exists_urls_version(self):
306306
assert 'version' in self.api_data['_urls']
307307

308308

309-
def test_api_field_type_urls_notes(self):
310-
""" Test for type for API Field
309+
# def test_api_field_type_urls_notes(self):
310+
# """ Test for type for API Field
311311

312-
_urls.version field must be str
313-
"""
312+
# _urls.version field must be str
313+
# """
314314

315-
assert type(self.api_data['_urls']['version']) is str
315+
# assert type(self.api_data['_urls']['version']) is str
316316

317317

318318

0 commit comments

Comments
 (0)