Commit Graph

6 Commits

Author SHA1 Message Date
Darragh Bailey 1ff58d6133 Split code for reuse and refactor for code style
To make it easier to reuse GitTree elsewhere move outside of the
gitfixture and reference.

Instead of treating the functions in utils as private to indicate they
shouldn't be relied upon outside of the package, switch utils to
indicate that it should not relied upon to clear up some IDE warnings
on use of private functions.

Finally avoid use of potentially mutable default params.

Change-Id: I3365a2c49ff570bd9e5eba5f53b4b3908dddd2b6
2019-05-22 18:13:04 +01:00
Darragh Bailey 2f95f62904 Fix arguments and add tests to autospec
Remove incorrect reference to 'self' after conversion to function from
object with method. Add some simple tests using autospecing to catch
passing the wrong number of arguments to the underlying github login
methods.

Change-Id: I8919997fca40a170fe47811a66db7964ba58a9d3
2018-12-18 16:13:49 +00:00
Darragh Bailey 701e2a1c36 Allow explicit control of repository name
If the user overrides the repo_name attributed, skip using the temporary
name generation.

Change-Id: Ia8c80ed139b5c5987886e2c7e00d63fd1d6aaf0f
2018-12-17 16:51:07 +00:00
Darragh Bailey 1593f2eb47 Drop Mixin class in favour of function
Change-Id: Id5622edb5d4209e81407786de5a9d7abe2b7b5e2
2018-12-13 16:19:07 +00:00
Darragh Bailey bd0d908b96 Fix temp name creation and cleanup
Allow the system to delete the file immediately as once the name is
generated there is no further need of the temp file.

Fix the temp name splitting and generation to handle being provided a
string without the 'XXXXXX' template as part of it.

Temporarily disable the requirements.txt check/gate as github3.py is
not part of global-requirements.

Change-Id: I14e56b0d4248dc037fab102acf3cb30573bfba8d
2018-12-13 16:18:48 +00:00
Darragh Bailey 248d079cc0 Initial fixture for git
Provide fixture object that can be used to build isolated test envs
when working with git and developing git tooling that uses the git
application.

Some basic tests on the topological sorting to ensure nodes are
returned in an expected order without requiring the code to enforce the
order.

Some simple acceptance tests ensure that the fixture will accept various
simple graphs and handle them correctly.

Change-Id: I5b39f8d52beca848adb20d646c26d91c4b977b92
2018-06-28 17:02:20 +01:00