jamesgeer / conf-twitter-bot

A Twitter Bot to post about academic papers
MIT License
4 stars 0 forks source link

Test harness #81

Closed jamesgeer closed 1 year ago

jamesgeer commented 1 year ago

The more tests that are written the more duplicate code I seem to be encountering, the problem is to insert some data usually relies on a foreign key constraint so each test suite first relies on a user being created, then a twitter user, then an account, etc which takes up a lot of code and adds "noise" to the file.

I propose a test harness class that has methods like "create user", "create account", etc, has a dummy user that can be used in the current test and tear-down methods when the test is complete.