This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:8b4cf238865ad5615983c105ab598a6d2c8021b072e8730e4123054e4b57a1a4" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:0b6a4a48de35a6c52ff9aee341fa629dbd6071b9ed5f6b6c82f8a7fd235bd772" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:b63eeaad1baa3086408d88e67a43bff6c163dfff9ef9e24603a49983b3bdcfb0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:cdd795a8e290c1759315e1e7938601c150ee819597f653bfec2d01bdd9892d34" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Movie | |
<table border="1" style="font-size:90%; padding: 1px;border-spacing: | |
0px; border-collapse: separate"> | |
<tbody><tr border="1"><th style="border-width: | |
1px; padding: 3px; margin: 4px; border-style: inset; border-color: | |
gray;">mID</th><th style="border-width: 1px; padding: 3px; margin: 4px; | |
border-style: inset; border-color: gray;">title</th><th style="border-width: 1px; padding: 3px; margin: 4px; border-style: | |
inset; border-color: gray;">year</th><th style="border-width: 1px; | |
padding: 3px; margin: 4px; border-style: inset; border-color: | |
gray;">director</th></tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
endicia_mailclass, = self.endicia_mailclass.search([]) | |
self.endicia_mailclass.write([endicia_mailclass], { | |
'name': 'None' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_get_rates(self): | |
""" | |
Test the get_rates method of Carrier. | |
""" | |
with Transaction().start(DB_NAME, USER, context=CONTEXT) as tr: | |
tr.set_context(sale=self.sale) | |
print(self.carrier.get_rates()) | |
Stack Trace: | |
ERROR: test_get_rates (tests.test_carrier.CarrierTestCase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code: | |
with Transaction().start(DB_NAME, USER, context=CONTEXT) as tr: | |
self.setup_defaults() | |
sale = self.create_sale(self.sale_party) | |
tr.set_context(sale=sale) | |
self.carrier.get_rates() | |
Partial Output: | |
(u'None Express Mail', Decimal('16.99'), self.currency1, {}, | |
{'endicia_mailclass': 1, 'carrier': 1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for argument in [ | |
{'name': 'None'}, | |
{'value': 'Value'}, | |
{'method_type': 'international'} | |
]: | |
self.assertRaises( | |
UserError, self.endicia_mailclass.write, | |
[endicia_mailclass], argument | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
""" tryton_shell: A dirty shell for Tryton to quickly interact with it | |
usage: tryton_shell.py [-h] --config CONFIG --database DATABASE | |
arguments: | |
--config CONFIG Tryton config file. | |
--database DATABASE Tryton database. |
OlderNewer