feat(devops): Update checkin model fixture so it creates the feature flag
ref: #813 #808
This commit is contained in:
@ -22,7 +22,7 @@ class BaseSerializer(serializers.ModelSerializer):
|
||||
return str( item )
|
||||
|
||||
url = serializers.HyperlinkedIdentityField(
|
||||
view_name="v2:devops:_api_v2_git_group-detail", format="html"
|
||||
view_name="v2:devops:_api_gitgroup-detail", format="html"
|
||||
)
|
||||
|
||||
|
||||
|
30
app/tests/fixtures/model_checkin.py
vendored
30
app/tests/fixtures/model_checkin.py
vendored
@ -13,29 +13,15 @@ def model_checkin():
|
||||
|
||||
@pytest.fixture( scope = 'class')
|
||||
def kwargs_checkin(django_db_blocker,
|
||||
kwargs_centurionmodel, model_software
|
||||
kwargs_centurionmodel, kwargs_featureflag
|
||||
):
|
||||
|
||||
|
||||
with django_db_blocker.unblock():
|
||||
|
||||
random_str = str(datetime.datetime.now(tz=datetime.timezone.utc))
|
||||
|
||||
software = model_software.objects.create(
|
||||
organization = kwargs_centurionmodel['organization'],
|
||||
name = 'ci' + random_str
|
||||
)
|
||||
|
||||
kwargs = {
|
||||
**kwargs_centurionmodel.copy(),
|
||||
'software': software,
|
||||
'version': '1.20.300',
|
||||
'deployment_id': 'rand deploymentid',
|
||||
'feature': 'a feature',
|
||||
}
|
||||
kwargs = {
|
||||
**kwargs_centurionmodel.copy(),
|
||||
'software': kwargs_featureflag['software'],
|
||||
'version': '1.20.300',
|
||||
'deployment_id': 'rand deploymentid',
|
||||
'feature': 'a feature',
|
||||
}
|
||||
|
||||
yield kwargs.copy()
|
||||
|
||||
with django_db_blocker.unblock():
|
||||
|
||||
software.delete()
|
||||
|
@ -1097,6 +1097,7 @@ markers = [
|
||||
"module_accounting: Selects all tests from module accounting.",
|
||||
"module_api: Selects all tests from module api.",
|
||||
"module_assistance: Selects all tests from module assistance.",
|
||||
"model_checkin: Selects tests for the checkin model",
|
||||
"module_config_management: Selects all tests from module config management.",
|
||||
"module_core: Selects all tests from module core.",
|
||||
"module_devops: Selects all tests from module devops.",
|
||||
|
Reference in New Issue
Block a user