Remove volume causing permission issues
This commit is contained in:
		
							parent
							
								
									9a25b90f06
								
							
						
					
					
						commit
						8ec2e5cd29
					
				| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
python /app/manage.py collectstatic --noinput
 | 
					python /app/manage.py collectstatic --noinput
 | 
				
			||||||
python /app/manage.py compilescss
 | 
					python /app/manage.py compilescss
 | 
				
			||||||
chmod -R 664 /var/log/gunicorn
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/usr/local/bin/gunicorn config.wsgi -w 2 -b unix:/data/sockets/stage-gunicorn-mhackspace.sock --error-logfile /var/log/gunicorn/stage-gunicorn-mhackspace.log --chdir=/app
 | 
					/usr/local/bin/gunicorn config.wsgi -w 2 -b unix:/data/sockets/stage-gunicorn-mhackspace.sock --error-logfile /var/log/gunicorn/stage-gunicorn-mhackspace.log --chdir=/app
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								live.yml
								
								
								
								
							
							
						
						
									
										1
									
								
								live.yml
								
								
								
								
							| 
						 | 
					@ -28,7 +28,6 @@ services:
 | 
				
			||||||
    env_file: .env
 | 
					    env_file: .env
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - .:/app
 | 
					      - .:/app
 | 
				
			||||||
      - ./compose/data/logs:/var/log/gunicorn
 | 
					 | 
				
			||||||
      - sockets:/data/sockets
 | 
					      - sockets:/data/sockets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  node:
 | 
					  node:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,7 +34,8 @@ class gocardlessMocks(TestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return self.provider
 | 
					        return self.provider
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def mock_success_responses(self):
 | 
					    def mock_success_responses(self, responses=None):
 | 
				
			||||||
 | 
					        if responses == None:
 | 
				
			||||||
        subscription_properties = Mock(
 | 
					        subscription_properties = Mock(
 | 
				
			||||||
            id='02',
 | 
					            id='02',
 | 
				
			||||||
            status='active',
 | 
					            status='active',
 | 
				
			||||||
| 
						 | 
					@ -62,3 +63,31 @@ class gocardlessMocks(TestCase):
 | 
				
			||||||
        self.provider.client.subscriptions.cancel = PropertyMock(
 | 
					        self.provider.client.subscriptions.cancel = PropertyMock(
 | 
				
			||||||
            return_value={'status_code': '200'})
 | 
					            return_value={'status_code': '200'})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def mock_success_responses2(self, responses=None):
 | 
				
			||||||
 | 
					        if responses == None:
 | 
				
			||||||
 | 
					            responses = [Mock(
 | 
				
			||||||
 | 
					                id='02',
 | 
				
			||||||
 | 
					                status='active',
 | 
				
			||||||
 | 
					                amount=20.00,
 | 
				
			||||||
 | 
					                created_at='date'
 | 
				
			||||||
 | 
					            )]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        mock_list = MagicMock()
 | 
				
			||||||
 | 
					        mock_list_records = MagicMock(side_effect=[subscription_properties])
 | 
				
			||||||
 | 
					        mock_list.records.return_value = mock_list_records
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.provider.client.subscriptions.list = mock_list
 | 
				
			||||||
 | 
					        ApiResponse = namedtuple('ApiResponse', 'api_response, created_at')
 | 
				
			||||||
 | 
					        ApiResponseStatus = namedtuple('ApiResponseStatus', 'status_code')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.provider.client.subscriptions.create = Mock(
 | 
				
			||||||
 | 
					            return_value=ApiResponse(
 | 
				
			||||||
 | 
					                created_at=self.date_now,
 | 
				
			||||||
 | 
					                api_response=ApiResponseStatus(status_code='200'))
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.provider.client.subscriptions.get.side_effects = responses
 | 
				
			||||||
 | 
					        self.provider.client.subscriptions.cancel = PropertyMock(
 | 
				
			||||||
 | 
					            return_value={'status_code': '200'})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,20 @@ class TestPaymentGatewaysGocardless(gocardlessMocks):
 | 
				
			||||||
        super().setUp()
 | 
					        super().setUp()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_unsubscribe(self):
 | 
					    def test_unsubscribe(self):
 | 
				
			||||||
        self.mock_success_responses()
 | 
					        responses = [
 | 
				
			||||||
 | 
					            Mock(
 | 
				
			||||||
 | 
					                id='02',
 | 
				
			||||||
 | 
					                status='active',
 | 
				
			||||||
 | 
					                amount=20.00,
 | 
				
			||||||
 | 
					                created_at='date'
 | 
				
			||||||
 | 
					            ), Mock(
 | 
				
			||||||
 | 
					                id='03',
 | 
				
			||||||
 | 
					                status='active2',
 | 
				
			||||||
 | 
					                amount=40.00,
 | 
				
			||||||
 | 
					                created_at='date'
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					        self.mock_success_responses2(responses)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        result = self.provider.cancel_subscription(user=self.user, reference='M01')
 | 
					        result = self.provider.cancel_subscription(user=self.user, reference='M01')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue