James CookeJames Cooke

Pyramid London talk - A testing strategy for Pyramid Applications

Pyramid London meetup returned in June to Skills Matter. This time I spoke about testing strategies for Pyramid applications.

As outlined in the slides below, my current testing framework builds up with doctests, through unit and integration tests to functional / behaviour driven testing on the outside of the application. Hopefully my very basic “drawn on Google Docs” diagram of the Pyramid Framework illustrates how each of the testing methods fits within the framework.

I would like to have been able to talk more about Behaviour Driven Development and testing with Behave, which I’m enjoying at the moment, but maybe that’s for another presentation. Again, putting together this presentation was really helpful - it helped me to reflect on the methods we’re using at the moment, and how I might be able to improve and progress the level of test driven development in my daily work.

Video is available via the SkillsMatter site.

Many thanks to Armin Ronacher for his talk on SQLAlchemy at the same Pyramid meetup - the video is also online at SkillsMatter. As well as the technical details and some hints for things to check out with SQLA, I found Armin’s thoughts on how the Pyramid community might improve on how we introduce new developers to Pyramid and SQLAlchemy very helpful. I hope I might be able to contribute to that some time in the future. Hopefully we’ll see more people at the next Pyramid Meetup which may include a talk on using Celery with Pyramid.

  • Django Factory Audit

    Exploring the various model instance factories available for Django. Each factory is tested based on the quality of the instances it creates. Bonus: talk version and slides also available.

  • Comparing Django Q Objects

    A super simple assertion helper for comparing instances of Django’s Q objects.

  • Cleaner unit testing with the Arrange Act Assert pattern

    My PyConUK 2016 talk about the AAA pattern for unit tests and how using it can help us all make our tests cleaner, easier to read and as Pythonic as possible.