36
36
create_test_user ,
37
37
format_date_or_datetime ,
38
38
)
39
- from datahub .export_win import (
40
- EXPORT_WINS_LEGACY_DATA_FEATURE_FLAG_NAME ,
41
- )
42
39
from datahub .export_win .models import (
43
40
CustomerResponse ,
44
41
CustomerResponseToken ,
54
51
WinAdviserFactory ,
55
52
WinFactory ,
56
53
)
57
- from datahub .feature_flag .test .factories import UserFeatureFlagFactory
58
54
from datahub .metadata .test .factories import TeamFactory
59
55
60
56
pytestmark = pytest .mark .django_db
61
57
62
58
63
- @pytest .fixture ()
64
- def export_wins_legacy_data_feature_flag ():
65
- """
66
- Creates the Export wins legacy data user feature flag.
67
- """
68
- yield UserFeatureFlagFactory (
69
- code = EXPORT_WINS_LEGACY_DATA_FEATURE_FLAG_NAME ,
70
- is_active = True ,
71
- )
72
-
73
-
74
59
@pytest .fixture ()
75
60
def export_wins ():
76
61
confirmed = CustomerResponseFactory .create_batch (
@@ -476,17 +461,8 @@ def test_list(self):
476
461
477
462
assert response_data ['count' ] == 2
478
463
479
- @pytest .mark .parametrize (
480
- 'list_legacy_data' ,
481
- (
482
- True ,
483
- False ,
484
- ),
485
- )
486
- def test_list_with_legacy_wins (self , list_legacy_data , export_wins_legacy_data_feature_flag ):
464
+ def test_list_with_legacy_wins (self ):
487
465
"""Tests listing wins."""
488
- if list_legacy_data :
489
- self .user .features .set ([export_wins_legacy_data_feature_flag ])
490
466
WinFactory .create_batch (2 , adviser = self .user )
491
467
WinFactory .create_batch (2 , adviser = self .user , migrated_on = now ())
492
468
url = reverse ('api-v4:export-win:collection' )
@@ -495,7 +471,7 @@ def test_list_with_legacy_wins(self, list_legacy_data, export_wins_legacy_data_f
495
471
assert response .status_code == status .HTTP_200_OK
496
472
response_data = response .json ()
497
473
498
- assert response_data ['count' ] == ( 4 if list_legacy_data else 2 )
474
+ assert response_data ['count' ] == 4
499
475
500
476
def test_list_default_sorting (self ):
501
477
"""Tests wins are sorted."""
0 commit comments