@@ -44,52 +44,22 @@ def test_sync_on_update_upload_token_required_for_public_repos(self, mock_publis
4444 owner = OwnerFactory (ownerid = 12345 , upload_token_required_for_public_repos = True )
4545 owner .upload_token_required_for_public_repos = False
4646 owner .save ()
47- mock_publish .assert_has_calls (
48- [
49- call (
50- "projects/test-project-id/topics/test-topic-id" ,
51- b'{"type": "owner", "sync": "one", "id": 12345}' ,
52- ),
53- call (
54- "projects/test-project-id/topics/test-topic-id" ,
55- b'{"type": "owner", "sync": "one", "id": 12345}' ,
56- ),
57- ]
58- )
47+ mock_publish .assert_not_called ()
5948
6049 def test_sync_on_update_username (self , mock_publish ):
6150 owner = OwnerFactory (ownerid = 12345 , username = "hello" )
6251 owner .username = "world"
6352 owner .save ()
64- mock_publish .assert_has_calls (
65- [
66- call (
67- "projects/test-project-id/topics/test-topic-id" ,
68- b'{"type": "owner", "sync": "one", "id": 12345}' ,
69- ),
70- call (
71- "projects/test-project-id/topics/test-topic-id" ,
72- b'{"type": "owner", "sync": "one", "id": 12345}' ,
73- ),
74- ]
53+ mock_publish .assert_called_once_with (
54+ "projects/test-project-id/topics/test-topic-id" ,
55+ b'{"type": "owner", "sync": "one", "id": 12345}' ,
7556 )
7657
7758 def test_sync_on_update_service (self , mock_publish ):
7859 owner = OwnerFactory (ownerid = 12345 , service = Service .GITHUB .value )
7960 owner .service = Service .BITBUCKET .value
8061 owner .save ()
81- mock_publish .assert_has_calls (
82- [
83- call (
84- "projects/test-project-id/topics/test-topic-id" ,
85- b'{"type": "owner", "sync": "one", "id": 12345}' ,
86- ),
87- call (
88- "projects/test-project-id/topics/test-topic-id" ,
89- b'{"type": "owner", "sync": "one", "id": 12345}' ,
90- ),
91- ]
92- )
62+ mock_publish .assert_not_called ()
9363
9464 def test_no_sync_on_update_other_fields (self , mock_publish ):
9565 owner = OwnerFactory (ownerid = 12345 , name = "hello" )
0 commit comments