[asterisk-dev] [Code Review] A python AsteriskCSVCDR library for testing csv cdrs
Terry Wilson
twilson at digium.com
Fri Apr 2 18:35:23 CDT 2010
> On 2010-04-02 18:20:38, Russell Bryant wrote:
> > /asterisk/trunk/lib/python/asterisk/cdr.py, line 74
> > <https://reviewboard.asterisk.org/r/605/diff/1/?file=9102#file9102line74>
> >
> > I think this can be:
> >
> > lines = f.readlines()
It can, but it ended up being a little slower in my testing, since I would have to go back and clean up the newlines.
> On 2010-04-02 18:20:38, Russell Bryant wrote:
> > /asterisk/trunk/lib/python/asterisk/cdr.py, line 25
> > <https://reviewboard.asterisk.org/r/605/diff/1/?file=9102#file9102line25>
> >
> > trailing whitespace
fixed.
> On 2010-04-02 18:20:38, Russell Bryant wrote:
> > /asterisk/trunk/lib/python/asterisk/cdr.py, line 58
> > <https://reviewboard.asterisk.org/r/605/diff/1/?file=9102#file9102line58>
> >
> > If there was a way to make this immutable, that would be a good thing
Added get_fields() and get_field() classmethod and changed fields to __fields.
> On 2010-04-02 18:20:38, Russell Bryant wrote:
> > /asterisk/trunk/lib/python/asterisk/cdr.py, lines 47-48
> > <https://reviewboard.asterisk.org/r/605/diff/1/?file=9102#file9102line47>
> >
> > It turns out that this syntax is new in 2.6, and the test suite should work for 2.4 and up
fixed.
- Terry
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/605/#review1794
-----------------------------------------------------------
On 2010-04-02 17:59:13, Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/605/
> -----------------------------------------------------------
>
> (Updated 2010-04-02 17:59:13)
>
>
> Review request for Asterisk Developers and Russell Bryant.
>
>
> Summary
> -------
>
> This is a library that adds the ability to test the CDRs that are generated during a test. It can read a list of CDRs in from cdr-csv file, and test that the fields match some given input.
>
> I have also added CDR parsing to the iax-basic-call test. I'll correct the trailing whitespace that I see that crept in. :-)
>
>
> Diffs
> -----
>
> /asterisk/trunk/lib/python/asterisk/cdr.py PRE-CREATION
> /asterisk/trunk/lib/python/asterisk/self_test/Master.csv PRE-CREATION
> /asterisk/trunk/lib/python/asterisk/self_test/Master2.csv PRE-CREATION
> /asterisk/trunk/tests/iax-call-basic/run-test 171
>
> Diff: https://reviewboard.asterisk.org/r/605/diff
>
>
> Testing
> -------
>
> There is some internal testing done and I have run the iax-basic-call test and verified that it works on trunk and branches/1.4. On 1.4.26.2, the iax-basic-call test fails because no Master.csv file is created for some reason.
>
>
> Thanks,
>
> Terry
>
>
More information about the asterisk-dev
mailing list