#64 explorer draft view
This commit is contained in:
		@@ -84,6 +84,34 @@ class TestExplorerProfileView(GlobalTemplateTestCaseMixin, ViewTestCase):
 | 
			
		||||
            msg='Expecting the latest place to be visible on the submitters profile page'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    def test_draft_in_explorer_places(self):
 | 
			
		||||
        user = User.objects.get(username='testpeter')
 | 
			
		||||
        Place.objects.create(
 | 
			
		||||
            name='Im the latest place in draft 3671',
 | 
			
		||||
            submitted_when=timezone.now(),
 | 
			
		||||
            submitted_by=user.explorer,
 | 
			
		||||
            location='Test %d town' % 5,
 | 
			
		||||
            latitude=50.5 + 5/10,
 | 
			
		||||
            longitude=7.0 - 5/10,
 | 
			
		||||
            description='This is just a test, do not worry %d' % 5,
 | 
			
		||||
            level=3,
 | 
			
		||||
            mode='draft'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        self.client.login(username='testpeter', password='Develop123')
 | 
			
		||||
 | 
			
		||||
        response = self.client.get(
 | 
			
		||||
            reverse('explorer_profile', kwargs={
 | 
			
		||||
                'explorer_id': user.explorer.id
 | 
			
		||||
            })
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        self.assertHttpOK(response)
 | 
			
		||||
        self.assertFalse(
 | 
			
		||||
            'Im the latest place in draft 3671' in response.content.decode(),
 | 
			
		||||
            msg='Expecting a place in draft mode to not show up on the submitters profile page'
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    def test_explorer_image(self):
 | 
			
		||||
        user = User.objects.get(username='testpeter')
 | 
			
		||||
        place = Place.objects.create(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user