Comments (2)
Thanks for the report. This should be fixed with #54.
from moto.
Can someone confirm that this was actually fixed? My tests for this and issue #60 both seem to still fail. This is the exact code I'm running to test these issues:
import unittest
from moto import mock_s3
import boto
from boto.s3.key import Key
class TestMoto(unittest.TestCase):
@mock_s3
def test_get_key_size(self):
conn = boto.connect_s3('the_key', 'the_secret')
b = conn.create_bucket('test')
k = Key(b, 'hi')
k.set_contents_from_string('hello')
self.assertEqual(k.size, 5) # Succeeds
self.assertEqual(b.get_key('hi').size, 5) # Fails
@mock_s3
def test_key_size(self):
conn = boto.connect_s3('the_key', 'the_secret')
b = conn.create_bucket('test')
k = Key(b, 'hi')
k.set_contents_from_string('hello')
self.assertEqual(k.size, 5) # Succeeds
k2 = Key(b, 'hi')
self.assertEqual(k2.size, 5) # Fails
if __name__=='__main__':
unittest.main()
I believe I'm running moto version 0.2.15 now and this should have been fixed by 0.2.10, but perhaps I'm mistaken.
from moto.
Related Issues (20)
- `WebsiteRedirectLocation` system-defined S3 object's metadata value not copied using multipart copy HOT 1
- moto does not enforce S3 object's tag limit
- mock_lambda missing PackageType attribute HOT 2
- bug: describe-availability-zones filtering does not work HOT 5
- Return a Challange when initiating 'admin_initiate_auth' if MFA is enabled with "SOFTWARE_TOKEN_MFA" HOT 3
- Find a way to add extensions (e.g. callbacks) to moto HOT 4
- DynamoDB UpdateExpression with newlines raises InvalidTokenException HOT 1
- ACM certificate does not work with subject alternative names HOT 2
- Slow s3 exception raising due to usage pattern of jinja2
- UnboundLocalError: cannot access local variable 'comparison_operator' where it is not associated with a value HOT 2
- lake formation does not correctly handle permissions on already known principal-resource-pairs HOT 2
- Route53 record with multivalue_answer_routing_policy cannot be destroyed HOT 2
- S3: paginator returns incorrect NextContinuationToken HOT 3
- create_change_set with ChangeSetType UPDATE fails when using template in YAML HOT 2
- Scheduler should raise ResourceNotFoundException for delete_schedule if not exists HOT 1
- Missing RequestId & HostId From mocked cognitoidp service API response HOT 5
- Cognito IDP/ create-resource-server: TypeError if no scopes are provided
- Cognito IDP - user not found after being created HOT 8
- @mock_sqs interfering with acm client HOT 5
- support list_group_memberships_for_member in identitystore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moto.