kopia lustrzana https://github.com/snarfed/bridgy-fed
				
				
				
			atproto_firehose: add missing import
							rodzic
							
								
									72877b7f11
								
							
						
					
					
						commit
						a8b4333759
					
				| 
						 | 
				
			
			@ -31,6 +31,7 @@ from common import (
 | 
			
		|||
    global_cache,
 | 
			
		||||
    global_cache_policy,
 | 
			
		||||
    global_cache_timeout_policy,
 | 
			
		||||
    report_error,
 | 
			
		||||
    report_exception,
 | 
			
		||||
    USER_AGENT,
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -574,3 +574,12 @@ class ATProtoFirehoseHandleTest(TestCase):
 | 
			
		|||
 | 
			
		||||
        self.assertEqual(orig_objs, Object.query().count())
 | 
			
		||||
        mock_create_task.assert_not_called()
 | 
			
		||||
 | 
			
		||||
    @patch.object(common.error_reporting_client, 'report_exception')
 | 
			
		||||
    @patch.object(Object, 'get_or_create', side_effect=RuntimeError('oops'))
 | 
			
		||||
    @patch('common.DEBUG', new=False)  # with DEBUG True, report_error just raises
 | 
			
		||||
    def test_exception_continues(self, mock_create_task, _, __):
 | 
			
		||||
        commits.put(Op(repo='did:plc:user', action='create', seq=789,
 | 
			
		||||
                       path='app.bsky.feed.post/123', record=REPLY_BSKY))
 | 
			
		||||
        handle(limit=1)
 | 
			
		||||
        # just check that we return instead of raising
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue