Skip to content

Instantly share code, notes, and snippets.

@chaws
Created May 14, 2020 14:44
Show Gist options
  • Save chaws/75bd9cd015b96f15035012694465e778 to your computer and use it in GitHub Desktop.
Save chaws/75bd9cd015b96f15035012694465e778 to your computer and use it in GitHub Desktop.
def test_status_of_first_build(self):
print('la'*42)
build = self.project2.builds.create(version='1')
print('Build created!!!')
print('build.status.baseline %s' % build.status.baseline)
print('ProjectStatus.baseline %s' % ProjectStatus.baseline)
status = ProjectStatus.create_or_update(build)
print('status %s (%d)' % (status, status.id))
print('build %s (%d)' % (build, build.id))
self.assertEqual(build, status.build)
print(status.get_previous())
print('le'*42)
self.assertIsNone(status.get_previous())
output
lalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalala
creating initial project status
created = True
Build.save(): status.baseline None
Build created!!!
build.status.baseline None
ProjectStatus.baseline <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor object at 0x7fb9737c1b38>
cls.baseline0 <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor object at 0x7fb9737c1b38>
previous_build None
created = False
previous_build None
cls.baseline <django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor object at 0x7fb9737c1b38>
status mygroup/myproject2, build 1 (1)
build 1 (2020-05-14 14:43:18.173896+00:00) (1)
self.baseline None
previous_status: None
None
lelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelelele
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment