'Test that we check if we\'re on the latest version if the latest
local installation update was 3 days ago and the frequency is set to
daily.
The local repository is in the latest version (git pull is run before)
In CircleCI this fails with the following message:
You asked to pull from the remote \'origin\', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command
line.'

@attr('ci_fails')
def test_update_required_not_forced(self):

    git_client = GitClient('.')
    git_client.pull()
    self.vmgr._start_cfg = start_cfg = StartUpConfig()
    start_cfg._autoupd = True
    start_cfg._freq = StartUpConfig.FREQ_DAILY
    last_upd = (datetime.date.today() - datetime.timedelta(days=3))
    start_cfg._lastupd = last_upd
    on_update_check_mock = MagicMock()
    on_already_latest_mock = MagicMock()
    on_update_mock = MagicMock()
    self.vmgr.register(VersionMgr.ON_UPDATE_CHECK, on_update_check_mock, None)
    self.vmgr.register(VersionMgr.ON_ALREADY_LATEST, on_already_latest_mock, None)
    self.vmgr.register(VersionMgr.ON_UPDATE, on_update_mock, None)
    self.vmgr.update()
    self.assertEqual(on_update_check_mock.call_count, 1)
    self.assertEqual(on_already_latest_mock.call_count, 1)
    self.assertEqual(on_update_mock.call_count, 0)
