def test_vm_no_version(self):
    manual_scaling = appinfo.ManualScaling()
    info = appinfo.AppInfoExternal(
        application='app',
        module='module1',
        runtime='vm',
        threadsafe=False,
        manual_scaling=manual_scaling,
    )

    appinfo_includes.ParseAndReturnIncludePaths(mox.IgnoreArg()).AndReturn(
        (info, []))
    os.path.getmtime('/appdir/app.yaml').AndReturn(10)

    self.mox.StubOutWithMock(application_configuration, 'generate_version_id')
    application_configuration.generate_version_id().AndReturn(
        'generated-version')
    self.mox.ReplayAll()
    config = application_configuration.ModuleConfiguration('/appdir/app.yaml')

    self.mox.VerifyAll()
    self.assertEqual(config.major_version, 'generated-version')
Example #2
0
  def test_vm_no_version(self):
    manual_scaling = appinfo.ManualScaling()
    info = appinfo.AppInfoExternal(
        application='app',
        module='module1',
        runtime='vm',
        threadsafe=False,
        manual_scaling=manual_scaling,
    )

    appinfo_includes.ParseAndReturnIncludePaths(mox.IgnoreArg()).AndReturn(
        (info, []))
    os.path.getmtime('/appdir/app.yaml').AndReturn(10)

    self.mox.StubOutWithMock(application_configuration, 'generate_version_id')
    application_configuration.generate_version_id().AndReturn(
        'generated-version')
    self.mox.ReplayAll()
    config = application_configuration.ModuleConfiguration('/appdir/app.yaml')

    self.mox.VerifyAll()
    self.assertEqual(config.major_version, 'generated-version')
 def test_generate_version_id(self):
   datetime_getter = lambda: datetime.datetime(2014, 9, 18, 17, 31, 45, 92949)
   generated_version = application_configuration.generate_version_id(
       datetime_getter)
   self.assertEqual(generated_version, '20140918t173145')
Example #4
0
 def test_generate_version_id(self):
   datetime_getter = lambda: datetime.datetime(2014, 9, 18, 17, 31, 45, 92949)
   generated_version = application_configuration.generate_version_id(
       datetime_getter)
   self.assertEqual(generated_version, '20140918t173145')