File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import ddt
1111from django .test .client import RequestFactory
1212from lxml import etree
13- from opaque_keys .edx .asides import AsideUsageKeyV1 , AsideUsageKeyV2
13+ from opaque_keys .edx .asides import AsideUsageKeyV1 , AsideUsageKeyV2 , UsageKey
1414from pytz import UTC
1515from xblock .fields import ScopeIds
1616from xblock .runtime import DictKeyValueStore , KvsFieldData
@@ -118,10 +118,12 @@ def test_aside_contains_tags(self):
118118 """
119119 Checks that available_tags list is not empty
120120 """
121- sids = ScopeIds (user_id = "bob" ,
122- block_type = "bobs-type" ,
123- def_id = "definition-id" ,
124- usage_id = "usage-id" )
121+ sids = ScopeIds (
122+ user_id = "bob" ,
123+ block_type = "bobs-type" ,
124+ def_id = "definition-id" ,
125+ usage_id = UsageKey .from_string ("block-v1:myOrg+myCourse+myRun+type@bobs-type+block@usage-id" ),
126+ )
125127 key_store = DictKeyValueStore ()
126128 field_data = KvsFieldData (key_store )
127129 runtime = TestRuntime (services = {'field-data' : field_data })
You can’t perform that action at this time.
0 commit comments