Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove stale dependency on "sure" #1227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tests/integration/cqlengine/test_timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ def test_timestamp_not_included_on_normal_create(self):
def test_timestamp_is_set_on_model_queryset(self):
delta = timedelta(seconds=30)
tmp = TestTimestampModel.timestamp(delta)
tmp._timestamp.should.equal(delta)
assert tmp._timestamp == delta

def test_non_batch_syntax_integration(self):
tmp = TestTimestampModel.timestamp(timedelta(seconds=30)).create(count=1)
tmp.should.be.ok
assert tmp

def test_non_batch_syntax_with_tll_integration(self):
tmp = TestTimestampModel.timestamp(timedelta(seconds=30)).ttl(30).create(count=1)
tmp.should.be.ok
assert tmp

def test_non_batch_syntax_unit(self):

Expand Down Expand Up @@ -129,7 +129,7 @@ def test_non_batch(self):
uid = uuid4()
tmp = TestTimestampModel.create(id=uid, count=1)

TestTimestampModel.get(id=uid).should.be.ok
assert TestTimestampModel.get(id=uid)

tmp.timestamp(timedelta(seconds=5)).delete()

Expand All @@ -143,15 +143,15 @@ def test_non_batch(self):

# calling .timestamp sets the TS on the model
tmp.timestamp(timedelta(seconds=5))
tmp._timestamp.should.be.ok
assert tmp._timestamp

# calling save clears the set timestamp
tmp.save()
tmp._timestamp.shouldnt.be.ok
assert not tmp._timestamp

tmp.timestamp(timedelta(seconds=5))
tmp.update()
tmp._timestamp.shouldnt.be.ok
assert not tmp._timestamp

def test_blind_delete(self):
"""
Expand All @@ -160,7 +160,7 @@ def test_blind_delete(self):
uid = uuid4()
tmp = TestTimestampModel.create(id=uid, count=1)

TestTimestampModel.get(id=uid).should.be.ok
assert TestTimestampModel.get(id=uid)

TestTimestampModel.objects(id=uid).timestamp(timedelta(seconds=5)).delete()

Expand All @@ -179,7 +179,7 @@ def test_blind_delete_with_datetime(self):
uid = uuid4()
tmp = TestTimestampModel.create(id=uid, count=1)

TestTimestampModel.get(id=uid).should.be.ok
assert TestTimestampModel.get(id=uid)

plus_five_seconds = datetime.now() + timedelta(seconds=5)

Expand All @@ -197,7 +197,7 @@ def test_delete_in_the_past(self):
uid = uuid4()
tmp = TestTimestampModel.create(id=uid, count=1)

TestTimestampModel.get(id=uid).should.be.ok
assert TestTimestampModel.get(id=uid)

# delete in the past, should not affect the object created above
TestTimestampModel.objects(id=uid).timestamp(timedelta(seconds=-60)).delete()
Expand Down