1 Star 0 Fork 0

Adolph/shopify_python_api

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
carrier_service_test.py 919 Bytes
Copy Edit Raw Blame History
import shopify
from test.test_helper import TestCase
class CarrierServiceTest(TestCase):
def test_create_new_carrier_service(self):
self.fake("carrier_services", method='POST', body=self.load_fixture('carrier_service'), headers={'Content-type': 'application/json'})
carrier_service = shopify.CarrierService.create({'name': "Some Postal Service"})
self.assertEqual("Some Postal Service", carrier_service.name)
def test_get_carrier_service(self):
self.fake("carrier_services/123456", method='GET', body=self.load_fixture('carrier_service'))
carrier_service = shopify.CarrierService.find(123456)
self.assertEqual("Some Postal Service", carrier_service.name)
def test_set_format_attribute(self):
carrier_service = shopify.CarrierService()
carrier_service.format = "json"
self.assertEqual("json", carrier_service.attributes['format'])
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chen_guo_hong/shopify_python_api.git
git@gitee.com:chen_guo_hong/shopify_python_api.git
chen_guo_hong
shopify_python_api
shopify_python_api
master

Search