Skip to content

Instantly share code, notes, and snippets.

@vishalsodani
Last active February 4, 2024 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishalsodani/897308edb2922ba4bada4a8fbceae4dc to your computer and use it in GitHub Desktop.
Save vishalsodani/897308edb2922ba4bada4a8fbceae4dc to your computer and use it in GitHub Desktop.
django testing

from https://www.youtube.com/watch?v=2n2hpN88b-M

use setupTestdata squash your migrations

make it easy to write integration tests Screenshot from 2024-02-04 14-02-59

  • pre-build fixtures

  • factories

  • mocks

  • Factory Boy - Screenshot from 2024-02-04 14-04-46

  • New Approach - Luke Plant Screenshot from 2024-02-04 14-06-20

  • Have a CustomTestCase Screenshot from 2024-02-04 14-07-25

  • Http mocking with httpprettyScreenshot from 2024-02-04 14-09-18

this is what I was looking for testing payment link with eazebuzz API

  • Mocking time with freezegun and time-machineScreenshot from 2024-02-04 14-10-25

Generating tests with chatgpt Screenshot from 2024-02-04 14-10-46

@vishalsodani
Copy link
Author

KOLO - can we generate tests from requests

@vishalsodani
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment