'Test that commerce configuration is created properly.'

def test_commerce_configuration(self):

    call_command('configure_commerce')
    commerce_configuration = CommerceConfiguration.current()
    self.assertTrue(commerce_configuration.enabled)
    self.assertTrue(commerce_configuration.checkout_on_ecommerce_service)
    self.assertEqual(commerce_configuration.single_course_checkout_page, '/basket/single-item/')
    self.assertEqual(commerce_configuration.cache_ttl, 0)
    call_command('configure_commerce', '--disable')
    commerce_configuration = CommerceConfiguration.current()
    self.assertFalse(commerce_configuration.enabled)
    call_command('configure_commerce', '--disable-checkout-on-ecommerce')
    commerce_configuration = CommerceConfiguration.current()
    self.assertFalse(commerce_configuration.checkout_on_ecommerce_service)
