Comments (2)
Seems at least the mime type is responsible for this
(lldb) po response.mimeType == receivedHTTPResponse.mimeType
false
(lldb) po response.mimeType
nil
(lldb) po receivedResponse?.mimeType
▿ Optional<String>
- some : "text/plain"
it is part of the equal func
private func isEqual(to other: URLResponse) -> Bool {
if self === other {
return true
}
return self.url == other.url &&
self.expectedContentLength == other.expectedContentLength &&
self.mimeType == other.mimeType &&
self.textEncodingName == other.textEncodingName
}
from mocknetworking.
Since the cause of this has been discovered I am going to close this issue. I've opened #20 to address the existing equal implementation and make a better one. When that issue is closed, then this issue will be completely addressed one way or another.
from mocknetworking.
Related Issues (20)
- Change URLPropertyStore to something else HOT 1
- Verify the HTTP Headers you setup in Mock Response are returned HOT 2
- Update the ReadMe to use the MockURLResponse type in addition to the HTTP Response type HOT 2
- Put MockPropertyResponse in its own file HOT 1
- Review the 2 registration api's and make sure they are consistent HOT 1
- Unit Test Body Data to make sure that you get the correct response back HOT 1
- Create a unit test to make sure you get the right error back HOT 1
- See if you can compare 2 http responses that you get back HOT 1
- Go through all Unit Tests and verify they aren't actually going on the network HOT 1
- Convert MockResponse to compose together HTTPURLResponse, error and data HOT 1
- URLResponse custom isEqual func for or custom XCTAssert for unit tests HOT 1
- Verify project works on Xcode 12.4
- Implement Delayed Responses HOT 1
- Document all public types, methods, etc HOT 1
- Update the ReadMe for MockNetworking HOT 1
- Implement Unit Test for Delayed Response HOT 1
- Implement Cancel request HOT 1
- Implement remove response for url HOT 1
- Fix the weird indentation in the ReadMe code example HOT 1
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 mocknetworking.