hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.2K
active users

Rickard Lindberg

@jamesshore Do you have an example how to test a router using testing without mocks?

By router I mean an entry level function that looks at a url or command line arguments or whatever and dispatches to the relevant "controller".

Example:

class MyWebApp:

def main(self, url):
if url.startswith("/home"):
self.home_controller.run(...)
elif url.startswith("/about"):
self.about_controller.run(...)