def test_associate_customer_on_login(self):
        request = self.factory.post('/shop/auth/login/', follow=True)
        request.user = self.lisa
        customer = Customer()
        customer.save()
        request.session = {
            'session_key': 'lisa_swap',
            SESSION_KEY: customer.pk,
        }
        request.customer = Customer.objects.get_customer(request)
        user_logged_in.send(sender=self.lisa.__class__, request=request, user=self.lisa)
        self.assertEqual(request.customer, customer)
        self.assertEqual(request.customer.user, self.lisa)
Test that when logging in as a user without existing customer account,
dataset/ETHPy150Open awesto/django-shop/testshop/skip_test_customer.py/CustomerTest.test_associate_customer_on_login