[PATCH v4 1/1] management: introduce replacerelations command

Daniel Axtens dja at axtens.net
Mon Jul 27 10:33:01 AEST 2020


Rohit Sarkar <rohitsarkar5398 at gmail.com> writes:

> Hey,
> On Thu, Jul 23, 2020 at 11:00:08AM +1000, Daniel Axtens wrote:
>> > 1) `docker-compose run web --tox` fails, both pep8 and in some of the
>> > substantive tests:
>> >
>> > Creating test database for alias 'default'...
>> > System check identified no issues (0 silenced).
>> > .............................................................................................................................................................................................................................................................................Invalid path: xyz123random
>> > .F..........................................................................................................................................................................................................................................s................................................................................
>> 
>> I think this might be because by the time you get to your test, a number
>> of patches have been created and destroyed, so the patches are no longer
>> numbered the way you expect. I didn't pick this up before because last
>> time I ran the tests there was only the one with the invalid path.
>
> Yeah, I missed this as I wasnt running the entire suite but just the
> individual test. Was wondering if there is any best practice for this
> for writing tests that depend on the ids in the database?

Not sure what best practice would be. I think in your case, you'll need
to create your patches, extract their IDs, and then write those into a
temporary file (see the tempfile module).

Kind regards,
Daniel

>
> Thanks,
> Rohit


More information about the Patchwork mailing list