Commit Graph

13 Commits

Author SHA1 Message Date
Brian C. Lane
b7499f79d3 Add /recipes/new route and tests
This handles json data when the mime type is "application/json" and toml
recipes when it is "text/x-toml"
2017-11-13 16:44:02 -08:00
Brian C. Lane
053662daf0 Split recipe_from_toml into recipe_from_dict helper.
This will be useful for creating Recipe objects from json created dicts.
2017-11-13 16:44:02 -08:00
Brian C. Lane
6d71e2fcc1 Fix the recipe version bumping
Recipe should have its version bumped based on the version from the
previous commit, and not be bumped on the first commit. Fix the code and
the tests.
2017-11-13 16:44:02 -08:00
Brian C. Lane
63f47c2c00 Add /recipes/changes route with tests. 2017-11-09 18:43:42 -08:00
Brian C. Lane
d58b650904 Add /recipes/info route and tests 2017-11-08 17:38:12 -08:00
Brian C. Lane
8607b3519f Add workspace module and tests
This handles the recipe workspace, which is a temporary location to
store recipes before committing them to git. It will be used by the
/recipes/ API.
2017-11-08 13:14:38 -08:00
Brian C. Lane
641ea8c715 Add /recipes/list route and tests
Includes adding a lock for access to the git repo from the API.
2017-11-08 09:46:12 -08:00
Brian C. Lane
ff47432f10 Move the git repo into a subdirectory
And fix the import of recipes (needs to have full path passed in).
2017-11-07 17:11:17 -08:00
Brian C. Lane
e4695bd580 Add basic API Server testing framework 2017-11-07 12:00:35 -08:00
Brian C. Lane
d2fe65c80c Fix list_commits sort order.
It appears that with libgit2 v0.24.6 reverse causes it to list them
newest first. In 0.25.1 it lists them oldest first. On both versions
just using SortMode.TIME gives the desired result of oldest first.
2017-10-25 13:31:35 -07:00
Brian C. Lane
68939a753a Add tests for the pylorax.api.recipes module 2017-10-25 13:31:35 -07:00
Alexander Todorov
806aad3dff Fix mocking the built-in open function for Python2
- fix import of mock module
- account for io.StringIO differences in Python 2
2017-10-24 22:59:21 +03:00
Alexander Todorov
66e8861de7 Add first unit test so we can start collecting coverage 2017-10-13 18:58:31 +03:00