6
6
import dill
7
7
from django .test import TransactionTestCase
8
8
9
- from reactpy_django import clean
9
+ from reactpy_django import tasks
10
10
from reactpy_django .models import ComponentSession , UserDataModel
11
11
from reactpy_django .types import ComponentParams
12
12
@@ -29,7 +29,7 @@ def test_component_params(self):
29
29
config .REACTPY_CLEAN_USER_DATA = False
30
30
31
31
try :
32
- clean .clean (immediate = True )
32
+ tasks .clean (immediate = True )
33
33
34
34
# Make sure the ComponentParams table is empty
35
35
assert ComponentSession .objects .count () == 0
@@ -48,7 +48,7 @@ def test_component_params(self):
48
48
49
49
# Try to delete the `params_1` via cleaning (it should be expired)
50
50
# Note: We don't use `immediate` here in order to test timestamping logic
51
- clean .clean ()
51
+ tasks .clean ()
52
52
53
53
# Make sure `params_1` has expired, but `params_2` is still there
54
54
assert ComponentSession .objects .count () == 1
@@ -98,7 +98,7 @@ def test_user_data_cleanup(self):
98
98
99
99
# Make sure the orphaned user data object is deleted
100
100
assert UserDataModel .objects .count () == initial_count + 1
101
- clean .clean_user_data ()
101
+ tasks .clean_user_data ()
102
102
assert UserDataModel .objects .count () == initial_count
103
103
104
104
# Check if deleting a user deletes the associated UserData
0 commit comments