Fix post tests, don't reply to self
This commit is contained in:
		
							parent
							
								
									107c3d6cf8
								
							
						
					
					
						commit
						9becbb24d4
					
				@ -87,6 +87,7 @@ class Compose(FormView):
 | 
			
		||||
                # Build a set of mentions for the content to start as
 | 
			
		||||
                mentioned = {self.reply_to.author}
 | 
			
		||||
                mentioned.update(self.reply_to.mentions.all())
 | 
			
		||||
                mentioned.discard(self.request.identity)
 | 
			
		||||
                initial["text"] = "".join(
 | 
			
		||||
                    f"@{identity.handle} " for identity in mentioned
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ from activities.models import Post, PostStates
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@pytest.mark.django_db
 | 
			
		||||
def test_fetch_post(httpx_mock: HTTPXMock):
 | 
			
		||||
def test_fetch_post(httpx_mock: HTTPXMock, config_system):
 | 
			
		||||
    """
 | 
			
		||||
    Tests that a post we don't have locally can be fetched by by_object_uri
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user