Skip to content

Commit

Permalink
Stick with what works.
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Nicholls committed Apr 16, 2019
1 parent a511d57 commit 393ff4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
# -- Mock modules ------------------------------------------------------------

# If we cannot import pytac prooperly or at then partially or fully mock them. # This is a temporary fix because the latest versions are not yet on pypi.
class DataSource(object):
pass

import pytac
try:
pytac.data_source
except AttributeError:
pytac.exceptions.FieldException = Exception
pytac.exceptions.HandleException = Exception
pytac.__dict__['data_source'] = types.ModuleType('data_source')
pytac.data_source.DataSource = object()
pytac.data_source.DataSource = DataSource

class Mock(MagicMock):
@classmethod
Expand Down

0 comments on commit 393ff4e

Please sign in to comment.