File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def create(self, allow_existing=False):
3030 raise google .api_core .exceptions .AlreadyExists (f"Topic { self .path !r} already exists." )
3131
3232 if not self .exists ():
33- MESSAGES [get_service_id ( self .path ) ] = []
33+ MESSAGES [self .name ] = []
3434 self ._created = True
3535
3636 def delete (self ):
@@ -39,7 +39,7 @@ def delete(self):
3939 :return None:
4040 """
4141 try :
42- del MESSAGES [get_service_id ( self .path ) ]
42+ del MESSAGES [self .name ]
4343 except KeyError :
4444 pass
4545
@@ -49,7 +49,7 @@ def exists(self, timeout=10):
4949 :param float timeout:
5050 :return bool:
5151 """
52- return get_service_id ( self .path ) in MESSAGES
52+ return self .name in MESSAGES
5353
5454
5555class MockSubscription (Subscription ):
@@ -70,7 +70,7 @@ def create(self, allow_existing=False):
7070 raise google .api_core .exceptions .AlreadyExists (f"Subscription { self .path !r} already exists." )
7171
7272 if not self .exists ():
73- SUBSCRIPTIONS [get_service_id ( self .path ) ] = []
73+ SUBSCRIPTIONS [self .name ] = []
7474 self ._created = True
7575
7676 def delete (self ):
@@ -86,7 +86,7 @@ def exists(self, timeout=5):
8686 :param float timeout:
8787 :return bool:
8888 """
89- return get_service_id ( self .path ) in SUBSCRIPTIONS
89+ return self .name in SUBSCRIPTIONS
9090
9191
9292class MockFuture :
You can’t perform that action at this time.
0 commit comments